From c45562e0e03e03c82bfcf60d4b3f8b7793133301 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Fri, 20 May 2016 15:14:28 -0300 Subject: Set openshift_version in config playbooks for first master. Starting to remove openshift.docker.openshift_version fact usage. openshift_version should no longer contain a leading 'v' for containerized installs, just a version number. --- playbooks/common/openshift-master/config.yml | 72 ++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 3 deletions(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 125aab0ae..17afbb48c 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -156,6 +156,29 @@ - master.etcd-ca.crt when: etcd_client_certs_missing is defined and etcd_client_certs_missing +# Must be run before generating master certs which involved openshift_cli role and needs +# to pull down the correct docker container: +- name: Determine openshift_version to install on first master + hosts: oo_first_master + any_errors_fatal: true + tasks: + - debug: var=openshift.common + - debug: var=openshift_image_tag + - debug: var=openshift_release + - name: Determine version to configure if containerized and release specified + set_fact: + openshift_version: "{{ openshift_release }}" + when: openshift.common.is_containerized | bool and openshift_release is defined + - name: Determine version to configure if containerized and image tag specified + set_fact: + openshift_version: "{{ openshift_image_tag.split('v',1)[1] }}" + when: openshift.common.is_containerized | bool and openshift_image_tag is defined + - name: Determine version to configure if already installed + set_fact: + openshift_version: "{{ openshift.common.version }}" + when: openshift.common.is_containerized | bool and openshift.common.version is defined + - debug: var=openshift_version + - name: Determine if master certificates need to be generated hosts: oo_first_master:oo_masters_to_config tasks: @@ -337,8 +360,50 @@ with_items: openshift_master_named_certificates when: named_certs_specified | bool -- name: Configure master instances - hosts: oo_masters_to_config +- name: Configure first master instances + hosts: oo_first_master + any_errors_fatal: true + serial: 1 + vars: + sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" + openshift_master_ha: "{{ openshift.master.ha }}" + openshift_master_count: "{{ openshift.master.master_count }}" + openshift_master_session_auth_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_auth_secrets }}" + openshift_master_session_encryption_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_encryption_secrets }}" + openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.common.portal_net }}" + openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] + | union(groups['oo_masters_to_config']) + | union(groups['oo_etcd_to_config'] | default([]))) + | oo_collect('openshift.common.hostname') | default([]) | join (',') + }}" + openshift_version: "{{ g_openshift_version_requested }}" + when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and + openshift_generate_no_proxy_hosts | default(True) | bool }}" + pre_tasks: + - name: Ensure certificate directory exists + file: + path: "{{ openshift.common.config_base }}/master" + state: directory + when: master_certs_missing | bool and 'oo_first_master' not in group_names + - name: Unarchive the tarball on the master + unarchive: + src: "{{ sync_tmpdir }}/{{ master_cert_subdir }}.tgz" + dest: "{{ master_cert_config_dir }}" + when: master_certs_missing | bool and 'oo_first_master' not in group_names + - debug: var=openshift_version + roles: + - openshift_master + - role: nickhammond.logrotate + - role: nuage_master + when: openshift.common.use_nuage | bool + post_tasks: + - name: Create group for deployment type + group_by: key=oo_masters_deployment_type_{{ openshift.common.deployment_type }} + changed_when: False + +# TODO: This is a copy paste of the oo_first_master, how do we reconcile the code but change openshift_version? +- name: Configure remaining master instances + hosts: oo_masters_to_config[1:] any_errors_fatal: true serial: 1 vars: @@ -353,7 +418,8 @@ | union(groups['oo_etcd_to_config'] | default([]))) | oo_collect('openshift.common.hostname') | default([]) | join (',') }}" - when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and + openshift_version: "{{ g_openshift_version_requested }}" + when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and openshift_generate_no_proxy_hosts | default(True) | bool }}" pre_tasks: - name: Ensure certificate directory exists -- cgit v1.2.3 From 0c7433838c8c6409b8de907fcc946fc73fe90527 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Tue, 24 May 2016 09:46:33 -0300 Subject: Work towards determining openshift_version when unspecified. openshift_docker role was largely useless now, but also almost did what we needed. (deps ordering still needs to be changed) Remove defaulting of openshift_version. --- playbooks/common/openshift-master/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 17afbb48c..380875a30 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -175,8 +175,8 @@ when: openshift.common.is_containerized | bool and openshift_image_tag is defined - name: Determine version to configure if already installed set_fact: - openshift_version: "{{ openshift.common.version }}" - when: openshift.common.is_containerized | bool and openshift.common.version is defined + openshift_version: "{{ openshift.common.version_requested }}" + when: openshift.common.is_containerized | bool and openshift.common.version_requested is defined - debug: var=openshift_version - name: Determine if master certificates need to be generated @@ -376,7 +376,7 @@ | union(groups['oo_etcd_to_config'] | default([]))) | oo_collect('openshift.common.hostname') | default([]) | join (',') }}" - openshift_version: "{{ g_openshift_version_requested }}" + #openshift_version: "{{ g_openshift_version_requested }}" when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and openshift_generate_no_proxy_hosts | default(True) | bool }}" pre_tasks: -- cgit v1.2.3 From 436c287335c3b578aaa2c1c8835583feaee2a3cf Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Tue, 24 May 2016 11:13:33 -0300 Subject: Stop downgrading Docker because we don't know what version to install yet. --- playbooks/common/openshift-master/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 380875a30..206e92c16 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -376,7 +376,7 @@ | union(groups['oo_etcd_to_config'] | default([]))) | oo_collect('openshift.common.hostname') | default([]) | join (',') }}" - #openshift_version: "{{ g_openshift_version_requested }}" + openshift_version: "{{ g_openshift_version_requested }}" when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and openshift_generate_no_proxy_hosts | default(True) | bool }}" pre_tasks: -- cgit v1.2.3 From 5c833d9f29e292d11c0cbf08786e9015f133ce17 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Tue, 24 May 2016 11:56:11 -0300 Subject: Complete installation of first master containerized. --- playbooks/common/openshift-master/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 206e92c16..9842e3917 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -360,7 +360,7 @@ with_items: openshift_master_named_certificates when: named_certs_specified | bool -- name: Configure first master instances +- name: Configure first master instance hosts: oo_first_master any_errors_fatal: true serial: 1 @@ -400,6 +400,7 @@ - name: Create group for deployment type group_by: key=oo_masters_deployment_type_{{ openshift.common.deployment_type }} changed_when: False + - fail: # TODO: This is a copy paste of the oo_first_master, how do we reconcile the code but change openshift_version? - name: Configure remaining master instances -- cgit v1.2.3 From 717012aa4d5df01e5859ce44705abfbf34be8047 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Wed, 25 May 2016 09:20:15 -0300 Subject: Hookup node configuration. --- playbooks/common/openshift-master/config.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 9842e3917..fb35a9d2f 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -175,8 +175,8 @@ when: openshift.common.is_containerized | bool and openshift_image_tag is defined - name: Determine version to configure if already installed set_fact: - openshift_version: "{{ openshift.common.version_requested }}" - when: openshift.common.is_containerized | bool and openshift.common.version_requested is defined + openshift_version: "{{ openshift.common.version }}" + when: openshift.common.is_containerized | bool and openshift.common.version is defined - debug: var=openshift_version - name: Determine if master certificates need to be generated @@ -366,6 +366,7 @@ serial: 1 vars: sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" + openshift_version: "{{ g_openshift_version_requested }}" openshift_master_ha: "{{ openshift.master.ha }}" openshift_master_count: "{{ openshift.master.master_count }}" openshift_master_session_auth_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_auth_secrets }}" @@ -376,7 +377,6 @@ | union(groups['oo_etcd_to_config'] | default([]))) | oo_collect('openshift.common.hostname') | default([]) | join (',') }}" - openshift_version: "{{ g_openshift_version_requested }}" when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and openshift_generate_no_proxy_hosts | default(True) | bool }}" pre_tasks: @@ -400,7 +400,6 @@ - name: Create group for deployment type group_by: key=oo_masters_deployment_type_{{ openshift.common.deployment_type }} changed_when: False - - fail: # TODO: This is a copy paste of the oo_first_master, how do we reconcile the code but change openshift_version? - name: Configure remaining master instances @@ -409,6 +408,7 @@ serial: 1 vars: sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" + openshift_version: "{{ oo_first_master.openshift.common.version.split('-')[0] }}" openshift_master_ha: "{{ openshift.master.ha }}" openshift_master_count: "{{ openshift.master.master_count }}" openshift_master_session_auth_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_auth_secrets }}" @@ -419,7 +419,6 @@ | union(groups['oo_etcd_to_config'] | default([]))) | oo_collect('openshift.common.hostname') | default([]) | join (',') }}" - openshift_version: "{{ g_openshift_version_requested }}" when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and openshift_generate_no_proxy_hosts | default(True) | bool }}" pre_tasks: -- cgit v1.2.3 From 58f920e854180cd9a8754fee82712fa8dd7b1f34 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Wed, 25 May 2016 14:54:59 -0300 Subject: Preserve node versions on re-run. --- playbooks/common/openshift-master/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index fb35a9d2f..97a7db9a1 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -158,6 +158,7 @@ # Must be run before generating master certs which involved openshift_cli role and needs # to pull down the correct docker container: +# TODO: Handle rpm installs here - name: Determine openshift_version to install on first master hosts: oo_first_master any_errors_fatal: true @@ -366,7 +367,6 @@ serial: 1 vars: sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" - openshift_version: "{{ g_openshift_version_requested }}" openshift_master_ha: "{{ openshift.master.ha }}" openshift_master_count: "{{ openshift.master.master_count }}" openshift_master_session_auth_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_auth_secrets }}" -- cgit v1.2.3 From 14b23a8b14636407143375cbac71b090663cee77 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Thu, 26 May 2016 14:30:37 -0300 Subject: Get rpm installations functional again. --- playbooks/common/openshift-master/config.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 97a7db9a1..063d86f60 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -158,7 +158,6 @@ # Must be run before generating master certs which involved openshift_cli role and needs # to pull down the correct docker container: -# TODO: Handle rpm installs here - name: Determine openshift_version to install on first master hosts: oo_first_master any_errors_fatal: true @@ -170,14 +169,21 @@ set_fact: openshift_version: "{{ openshift_release }}" when: openshift.common.is_containerized | bool and openshift_release is defined - - name: Determine version to configure if containerized and image tag specified +# TODO: what should we do for rpm installs and openshift_release here? + - name: Determine container version to configure when openshift_image_tag specified set_fact: openshift_version: "{{ openshift_image_tag.split('v',1)[1] }}" when: openshift.common.is_containerized | bool and openshift_image_tag is defined - - name: Determine version to configure if already installed + - name: Determine rpm version to configure when openshift_pkg_version specified + set_fact: + # Expects a leading "-" in inventory, strip it off here, and ignore a trailing release, + # openshift_version should always just be "3.2" or "3.2.0.44" + openshift_version: "{{ openshift_pkg_version[1:].split('-')[0] }}" + when: not openshift.common.is_containerized | bool and openshift_pkg_version is defined + - name: Use openshift.common.version fact as version to configure if already installed set_fact: openshift_version: "{{ openshift.common.version }}" - when: openshift.common.is_containerized | bool and openshift.common.version is defined + when: openshift.common.version is defined - debug: var=openshift_version - name: Determine if master certificates need to be generated -- cgit v1.2.3 From 3f7ac81838d0cef4ea95505abf82be7e114ae415 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Mon, 30 May 2016 09:20:28 -0300 Subject: Protect installed version on subsequent masters. --- playbooks/common/openshift-master/config.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 063d86f60..1812ccd1f 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -158,10 +158,12 @@ # Must be run before generating master certs which involved openshift_cli role and needs # to pull down the correct docker container: -- name: Determine openshift_version to install on first master +- name: Determine openshift_version to configure on first master hosts: oo_first_master any_errors_fatal: true - tasks: + # We do initial seeding of openshift_version if possible with these tasks. The openshift_docker role + # will make absolutely sure it's set to a specific version after this. + pre_tasks: - debug: var=openshift.common - debug: var=openshift_image_tag - debug: var=openshift_release @@ -185,6 +187,24 @@ openshift_version: "{{ openshift.common.version }}" when: openshift.common.version is defined - debug: var=openshift_version + roles: + - openshift_docker + +# Re-use pre-existing version fact if present, if not use the first master's +# openshift_version calculated above. +- name: Determine openshift_version to configure on remaining masters + hosts: oo_masters_to_config[1:] + any_errors_fatal: true + tasks: + - set_fact: + openshift_version: "{{ hostvars[groups.oo_first_master.0].openshift_version }}" + when: openshift.common.version is not defined + - set_fact: + openshift_version: "{{ openshift.common.version }}" + when: openshift.common.version is defined + - debug: var=openshift_version + post_tasks: + - fail: - name: Determine if master certificates need to be generated hosts: oo_first_master:oo_masters_to_config -- cgit v1.2.3 From 265daf6b65206fc17ad35e682640477d08efbc43 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Mon, 30 May 2016 11:52:48 -0300 Subject: Refactor openshift_version behavior. Very early in playbooks we must init the openshift_version for each host. First we determine it for the master, logic now is pushed into the openshift_docker role which we run only on first master via openshift_cli. Facts are reloaded leaving us with a first master with openshift.common.version fact we can then re-use on all other hosts. The correct version of docker should be installed as well. We then set openshift_version for all other hosts by re-using the master fact. --- playbooks/common/openshift-master/config.yml | 86 +++------------------------- 1 file changed, 8 insertions(+), 78 deletions(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 1812ccd1f..c39af9c40 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -167,45 +167,10 @@ - debug: var=openshift.common - debug: var=openshift_image_tag - debug: var=openshift_release - - name: Determine version to configure if containerized and release specified - set_fact: - openshift_version: "{{ openshift_release }}" - when: openshift.common.is_containerized | bool and openshift_release is defined -# TODO: what should we do for rpm installs and openshift_release here? - - name: Determine container version to configure when openshift_image_tag specified - set_fact: - openshift_version: "{{ openshift_image_tag.split('v',1)[1] }}" - when: openshift.common.is_containerized | bool and openshift_image_tag is defined - - name: Determine rpm version to configure when openshift_pkg_version specified - set_fact: - # Expects a leading "-" in inventory, strip it off here, and ignore a trailing release, - # openshift_version should always just be "3.2" or "3.2.0.44" - openshift_version: "{{ openshift_pkg_version[1:].split('-')[0] }}" - when: not openshift.common.is_containerized | bool and openshift_pkg_version is defined - - name: Use openshift.common.version fact as version to configure if already installed - set_fact: - openshift_version: "{{ openshift.common.version }}" - when: openshift.common.version is defined - debug: var=openshift_version roles: - openshift_docker -# Re-use pre-existing version fact if present, if not use the first master's -# openshift_version calculated above. -- name: Determine openshift_version to configure on remaining masters - hosts: oo_masters_to_config[1:] - any_errors_fatal: true - tasks: - - set_fact: - openshift_version: "{{ hostvars[groups.oo_first_master.0].openshift_version }}" - when: openshift.common.version is not defined - - set_fact: - openshift_version: "{{ openshift.common.version }}" - when: openshift.common.version is defined - - debug: var=openshift_version - post_tasks: - - fail: - - name: Determine if master certificates need to be generated hosts: oo_first_master:oo_masters_to_config tasks: @@ -387,54 +352,19 @@ with_items: openshift_master_named_certificates when: named_certs_specified | bool -- name: Configure first master instance - hosts: oo_first_master +- name: Configure masters + hosts: oo_masters_to_config any_errors_fatal: true serial: 1 vars: sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" - openshift_master_ha: "{{ openshift.master.ha }}" - openshift_master_count: "{{ openshift.master.master_count }}" - openshift_master_session_auth_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_auth_secrets }}" - openshift_master_session_encryption_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_encryption_secrets }}" - openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.common.portal_net }}" - openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] - | union(groups['oo_masters_to_config']) - | union(groups['oo_etcd_to_config'] | default([]))) - | oo_collect('openshift.common.hostname') | default([]) | join (',') - }}" - when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and - openshift_generate_no_proxy_hosts | default(True) | bool }}" - pre_tasks: - - name: Ensure certificate directory exists - file: - path: "{{ openshift.common.config_base }}/master" - state: directory - when: master_certs_missing | bool and 'oo_first_master' not in group_names - - name: Unarchive the tarball on the master - unarchive: - src: "{{ sync_tmpdir }}/{{ master_cert_subdir }}.tgz" - dest: "{{ master_cert_config_dir }}" - when: master_certs_missing | bool and 'oo_first_master' not in group_names - - debug: var=openshift_version - roles: - - openshift_master - - role: nickhammond.logrotate - - role: nuage_master - when: openshift.common.use_nuage | bool - post_tasks: - - name: Create group for deployment type - group_by: key=oo_masters_deployment_type_{{ openshift.common.deployment_type }} - changed_when: False -# TODO: This is a copy paste of the oo_first_master, how do we reconcile the code but change openshift_version? -- name: Configure remaining master instances - hosts: oo_masters_to_config[1:] - any_errors_fatal: true - serial: 1 - vars: - sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" - openshift_version: "{{ oo_first_master.openshift.common.version.split('-')[0] }}" + # Do not pass a version if this is first master. (openshift_docker will sort it out) + # For subsequent masters we pass either pre-existing version for the master (if already installed), + # otherwise the first master version. + openshift_version: "{{ openshift.common.version if openshift.common.version is defined else oo_first_master.openshift.common.version.split('-')[0] }}" + when: inventory_hostname != groups.oo_first_master.0 + openshift_master_ha: "{{ openshift.master.ha }}" openshift_master_count: "{{ openshift.master.master_count }}" openshift_master_session_auth_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_auth_secrets }}" -- cgit v1.2.3 From 88839ab89210ecd3d20d1f10f8f03bf0a801502a Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Mon, 6 Jun 2016 11:47:50 -0300 Subject: Do not install rpm for version in openshift_version role. --- playbooks/common/openshift-master/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 8ed62a7f1..7ab046e04 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -317,7 +317,7 @@ vars: sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" - # Do not pass a version if this is first master. (openshift_docker will sort it out) + # Do not pass a version if this is first master. (openshift_version will sort it out) # For subsequent masters we pass either pre-existing version for the master (if already installed), # otherwise the first master version. openshift_version: "{{ openshift.common.version if openshift.common.version is defined else oo_first_master.openshift.common.version.split('-')[0] }}" -- cgit v1.2.3 From 9f40c71d007ec7098090a4edafc1846cc37d5dc2 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Mon, 6 Jun 2016 12:04:10 -0300 Subject: Drop unused and broken "when" in vars section. --- playbooks/common/openshift-master/config.yml | 7 ------- 1 file changed, 7 deletions(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 7ab046e04..5e57cdeef 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -316,13 +316,6 @@ serial: 1 vars: sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" - - # Do not pass a version if this is first master. (openshift_version will sort it out) - # For subsequent masters we pass either pre-existing version for the master (if already installed), - # otherwise the first master version. - openshift_version: "{{ openshift.common.version if openshift.common.version is defined else oo_first_master.openshift.common.version.split('-')[0] }}" - when: inventory_hostname != groups.oo_first_master.0 - openshift_master_ha: "{{ openshift.master.ha }}" openshift_master_count: "{{ openshift.master.master_count }}" openshift_master_session_auth_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_auth_secrets }}" -- cgit v1.2.3 From 8c9ed6719bdbc0ce7574fa9261c60e4978c203e6 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Mon, 20 Jun 2016 14:45:42 -0300 Subject: Fix docker restarts during openshift_version role. The variable here must be explicitly passed to the docker role, if it's passed sometimes and not others, the docker config changes triggers a docker restart effectively killing everything on the node in an unsafe manner. Instead lets make sure the value is set. --- playbooks/common/openshift-master/config.yml | 2 -- 1 file changed, 2 deletions(-) (limited to 'playbooks/common/openshift-master') diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 5e57cdeef..f17f6a1e9 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -204,7 +204,6 @@ | oo_collect('openshift.common.all_hostnames') | oo_flatten | unique }}" sync_tmpdir: "{{ hostvars.localhost.g_master_mktemp.stdout }}" - openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.common.portal_net }}" roles: - openshift_master_certificates post_tasks: @@ -320,7 +319,6 @@ openshift_master_count: "{{ openshift.master.master_count }}" openshift_master_session_auth_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_auth_secrets }}" openshift_master_session_encryption_secrets: "{{ hostvars[groups.oo_first_master.0].openshift.master.session_encryption_secrets }}" - openshift_docker_hosted_registry_network: "{{ hostvars[groups.oo_first_master.0].openshift.common.portal_net }}" openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] | union(groups['oo_masters_to_config']) | union(groups['oo_etcd_to_config'] | default([]))) -- cgit v1.2.3