summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-06-05 15:42:38 -0400
committerJason DeTiberus <jdetiber@redhat.com>2015-06-15 10:00:01 -0400
commit5a29571ae9f6bc1f8295f71c261e749ec8d296cd (patch)
tree6e05c2f8b76c25f7423515f0eff8859c5e99a55b /roles/openshift_facts/library
parentffb8bbe2fd6b85ab0f2c108292034931edae1747 (diff)
downloadopenshift-5a29571ae9f6bc1f8295f71c261e749ec8d296cd.tar.gz
openshift-5a29571ae9f6bc1f8295f71c261e749ec8d296cd.tar.bz2
openshift-5a29571ae9f6bc1f8295f71c261e749ec8d296cd.tar.xz
openshift-5a29571ae9f6bc1f8295f71c261e749ec8d296cd.zip
Guard against openstack bug 1334857
Some versions of openstack erroneously return a comma separated list for the local-ipv4 value, this ensures that we handle that case properly
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index cb67a13de..7bc7c3260 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -242,8 +242,8 @@ def normalize_openstack_facts(metadata, facts):
# metadata api, should be updated if neutron exposes this.
facts['zone'] = metadata['availability_zone']
-
- facts['network']['ip'] = metadata['ec2_compat']['local-ipv4']
+ local_ipv4 = metadata['ec2_compat']['local-ipv4'].split(',')[0]
+ facts['network']['ip'] = local_ipv4
facts['network']['public_ip'] = metadata['ec2_compat']['public-ipv4']
# TODO: verify local hostname makes sense and is resolvable