From 5a29571ae9f6bc1f8295f71c261e749ec8d296cd Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Fri, 5 Jun 2015 15:42:38 -0400 Subject: 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 --- roles/openshift_facts/library/openshift_facts.py | 4 ++-- 1 file 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 -- cgit v1.2.3