summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Munilla <smunilla@redhat.com>2016-11-03 10:40:47 -0400
committerSamuel Munilla <smunilla@redhat.com>2016-11-03 10:40:47 -0400
commit0a0f0fc3126179b01f45f76cc85bc30cee428070 (patch)
tree1d576c2a458aaef23213bb49d53c86c0870084ee
parenta5f884039104aeffdea0b2ef232b3ea32a9b3132 (diff)
downloadopenshift-0a0f0fc3126179b01f45f76cc85bc30cee428070.tar.gz
openshift-0a0f0fc3126179b01f45f76cc85bc30cee428070.tar.bz2
openshift-0a0f0fc3126179b01f45f76cc85bc30cee428070.tar.xz
openshift-0a0f0fc3126179b01f45f76cc85bc30cee428070.zip
Update flannel etcd vars for 0.5.5
flannel-0.5.5 uses different variable names in /etc/sysconfig/flannel. This writes both the old and next variable name to the file for quick compatibility. Fixes #2635 Fixes Bug 1391515
-rw-r--r--roles/flannel/tasks/main.yml19
-rw-r--r--utils/src/ooinstall/cli_installer.py2
2 files changed, 10 insertions, 11 deletions
diff --git a/roles/flannel/tasks/main.yml b/roles/flannel/tasks/main.yml
index 6b6dfb423..d41eb0de8 100644
--- a/roles/flannel/tasks/main.yml
+++ b/roles/flannel/tasks/main.yml
@@ -4,21 +4,18 @@
action: "{{ ansible_pkg_mgr }} name=flannel state=present"
when: not openshift.common.is_containerized | bool
-- name: Set flannel etcd url
+- name: Set flannel etcd options
become: yes
lineinfile:
dest: /etc/sysconfig/flanneld
backrefs: yes
- regexp: "^(FLANNEL_ETCD=)"
- line: '\1{{ etcd_hosts|join(",") }}'
-
-- name: Set flannel etcd key
- become: yes
- lineinfile:
- dest: /etc/sysconfig/flanneld
- backrefs: yes
- regexp: "^(FLANNEL_ETCD_KEY=)"
- line: '\1{{ flannel_etcd_key }}'
+ regexp: "{{ item.regexp }}"
+ line: "{{ item.line }}"
+ with_items:
+ - { regexp: "^(FLANNEL_ETCD=)", line: '\1{{ etcd_hosts|join(",") }}' }
+ - { regexp: "^(FLANNEL_ETCD_ENDPOINTS=)", line: '\1{{ etcd_hosts|join(",") }}' }
+ - { regexp: "^(FLANNEL_ETCD_KEY=)", line: '\1{{ flannel_etcd_key }}' }
+ - { regexp: "^(FLANNEL_ETCD_KEY_PREFIX=)", line: '\1{{ flannel_etcd_key }}' }
- name: Set flannel options
become: yes
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index 2a23866e0..fe8e19587 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -306,6 +306,7 @@ hostname.
else:
return None
+
def set_cluster_hostname(oo_cfg):
message = """
You have chosen to install a single master cluster (non-HA).
@@ -321,6 +322,7 @@ If you want to override the cluster host name now to something other than the de
default='')
oo_cfg.deployment.variables['openshift_master_cluster_hostname'] = cluster_hostname
+
def collect_storage_host(hosts):
"""
Get a valid host for storage from the user and append it to the list of