summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-11-07 16:25:56 -0500
committerScott Dodson <sdodson@redhat.com>2016-11-07 16:25:56 -0500
commit9b1dd97dbf5f205edf4a0e1b24d24a3f9d8a78e6 (patch)
tree3a5f33fae1ddec8a7f3a4b7088a75e371f23194a
parent24b351d565835fbc287007c37dbf8ee9d94d8398 (diff)
downloadopenshift-9b1dd97dbf5f205edf4a0e1b24d24a3f9d8a78e6.tar.gz
openshift-9b1dd97dbf5f205edf4a0e1b24d24a3f9d8a78e6.tar.bz2
openshift-9b1dd97dbf5f205edf4a0e1b24d24a3f9d8a78e6.tar.xz
openshift-9b1dd97dbf5f205edf4a0e1b24d24a3f9d8a78e6.zip
Revert "Check that OpenStack hostnames are resolvable"
This reverts commit 3cc2d6b019fa8a05ba480a7425cd654aa051355f.
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 95325610d..36a2d1f4f 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -363,15 +363,12 @@ def normalize_openstack_facts(metadata, facts):
facts['network']['ip'] = local_ipv4
facts['network']['public_ip'] = metadata['ec2_compat']['public-ipv4']
- for f_var, h_var, ip_var in [('hostname', 'hostname', 'local-ipv4'),
- ('public_hostname', 'public-hostname', 'public-ipv4')]:
- try:
- if socket.gethostbyname(metadata['ec2_compat'][h_var]) == metadata['ec2_compat'][ip_var]:
- facts['network'][f_var] = metadata['ec2_compat'][h_var]
- else:
- facts['network'][f_var] = metadata['ec2_compat'][ip_var]
- except socket.gaierror:
- facts['network'][f_var] = metadata['ec2_compat'][ip_var]
+ # TODO: verify local hostname makes sense and is resolvable
+ facts['network']['hostname'] = metadata['hostname']
+
+ # TODO: verify that public hostname makes sense and is resolvable
+ pub_h = metadata['ec2_compat']['public-hostname']
+ facts['network']['public_hostname'] = pub_h
return facts