summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorSamuel Munilla <smunilla@redhat.com>2016-02-24 10:03:56 -0500
committerSamuel Munilla <smunilla@redhat.com>2016-02-24 10:30:11 -0500
commit4c84eebddaea08be5dcb89b1a27bb9c886a0a321 (patch)
treeb2cdcc18a02d28747de3bbf6ea0bf4e72fcbc163 /utils
parent5cc71c364963c52eb73b89a7599e422ff42b959f (diff)
downloadopenshift-4c84eebddaea08be5dcb89b1a27bb9c886a0a321.tar.gz
openshift-4c84eebddaea08be5dcb89b1a27bb9c886a0a321.tar.bz2
openshift-4c84eebddaea08be5dcb89b1a27bb9c886a0a321.tar.xz
openshift-4c84eebddaea08be5dcb89b1a27bb9c886a0a321.zip
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.
Diffstat (limited to 'utils')
-rw-r--r--utils/src/ooinstall/cli_installer.py4
1 files changed, 3 insertions, 1 deletions
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