From 4c84eebddaea08be5dcb89b1a27bb9c886a0a321 Mon Sep 17 00:00:00 2001 From: Samuel Munilla Date: Wed, 24 Feb 2016 10:03:56 -0500 Subject: a-o-i: Better method for identifying master_lb The previous check was less than reliable thanks to potential differences between hostname / ip / connect_to. This check should cover all instances. --- utils/src/ooinstall/cli_installer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py index 7a97de4e6..07429de09 100644 --- a/utils/src/ooinstall/cli_installer.py +++ b/utils/src/ooinstall/cli_installer.py @@ -533,7 +533,9 @@ def get_installed_hosts(hosts, callback_facts): try: first_master = next(host for host in hosts if host.master) lb_hostname = callback_facts[first_master.connect_to]['master'].get('cluster_hostname', '') - lb_host = next(host for host in hosts if host.connect_to == lb_hostname) + lb_host = \ + next(host for host in hosts if host.ip == callback_facts[lb_hostname]['common']['ip']) + installed_hosts.append(lb_host) except (KeyError, StopIteration): pass -- cgit v1.2.3 From 2fa19cdba71289c7e2006c992e55606c0147ebd6 Mon Sep 17 00:00:00 2001 From: Samuel Munilla Date: Wed, 24 Feb 2016 12:58:13 -0500 Subject: a-o-i: Double safety check on master_lb --- utils/src/ooinstall/cli_installer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py index 07429de09..ace834323 100644 --- a/utils/src/ooinstall/cli_installer.py +++ b/utils/src/ooinstall/cli_installer.py @@ -540,17 +540,18 @@ def get_installed_hosts(hosts, callback_facts): except (KeyError, StopIteration): pass - for host in hosts: if host.connect_to in callback_facts.keys() and is_installed_host(host, callback_facts): installed_hosts.append(host) return installed_hosts def is_installed_host(host, callback_facts): - return 'common' in callback_facts[host.connect_to].keys() and \ + version_found = 'common' in callback_facts[host.connect_to].keys() and \ callback_facts[host.connect_to]['common'].get('version', '') and \ callback_facts[host.connect_to]['common'].get('version', '') != 'None' + return version_found or host.master_lb or host.preconfigured + # pylint: disable=too-many-branches # This pylint error will be corrected shortly in separate PR. def get_hosts_to_run_on(oo_cfg, callback_facts, unattended, force, verbose): -- cgit v1.2.3 From 4498ce37b10399b495bb3e6e907d369a33323b07 Mon Sep 17 00:00:00 2001 From: Brenton Leanhardt Date: Wed, 24 Feb 2016 14:00:28 -0500 Subject: Automatic commit of package [openshift-ansible] release [3.0.47-1]. --- .tito/packages/openshift-ansible | 2 +- openshift-ansible.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.tito/packages/openshift-ansible b/.tito/packages/openshift-ansible index 4b283f29f..ab096b300 100644 --- a/.tito/packages/openshift-ansible +++ b/.tito/packages/openshift-ansible @@ -1 +1 @@ -3.0.46-1 ./ +3.0.47-1 ./ diff --git a/openshift-ansible.spec b/openshift-ansible.spec index a9ac557a5..c92ea2843 100644 --- a/openshift-ansible.spec +++ b/openshift-ansible.spec @@ -5,7 +5,7 @@ } Name: openshift-ansible -Version: 3.0.46 +Version: 3.0.47 Release: 1%{?dist} Summary: Openshift and Atomic Enterprise Ansible License: ASL 2.0 @@ -261,6 +261,10 @@ Atomic OpenShift Utilities includes %changelog +* Wed Feb 24 2016 Brenton Leanhardt 3.0.47-1 +- a-o-i: Double safety check on master_lb (smunilla@redhat.com) +- a-o-i: Better method for identifying master_lb (smunilla@redhat.com) + * Tue Feb 23 2016 Brenton Leanhardt 3.0.46-1 - a-o-i: Exception checking around master_lb (smunilla@redhat.com) -- cgit v1.2.3