summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-06-07 09:46:33 -0400
committerGitHub <noreply@github.com>2017-06-07 09:46:33 -0400
commitab7b2e1e4744763df5f2716a3125adaad9ad295f (patch)
tree20b4faf86351f6d4e443b02202e7704e46a8152a
parent11ec59a6193cf7966a39ed101e1d8c8fcdebe278 (diff)
parentc6837b8b6b09f927a3ea9b40f3c10bdcf094d9ff (diff)
downloadopenshift-ab7b2e1e4744763df5f2716a3125adaad9ad295f.tar.gz
openshift-ab7b2e1e4744763df5f2716a3125adaad9ad295f.tar.bz2
openshift-ab7b2e1e4744763df5f2716a3125adaad9ad295f.tar.xz
openshift-ab7b2e1e4744763df5f2716a3125adaad9ad295f.zip
Merge pull request #4349 from sdodson/bz1392519
Do not attempt to override openstack nodename
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 514c06500..cfe092a28 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -193,8 +193,7 @@ def hostname_valid(hostname):
"""
if (not hostname or
hostname.startswith('localhost') or
- hostname.endswith('localdomain') or
- hostname.endswith('novalocal')):
+ hostname.endswith('localdomain')):
return False
return True
@@ -1041,10 +1040,13 @@ def set_sdn_facts_if_unset(facts, system_facts):
def set_nodename(facts):
""" set nodename """
if 'node' in facts and 'common' in facts:
- if 'cloudprovider' in facts and facts['cloudprovider']['kind'] == 'openstack':
- facts['node']['nodename'] = facts['provider']['metadata']['hostname'].replace('.novalocal', '')
- elif 'cloudprovider' in facts and facts['cloudprovider']['kind'] == 'gce':
+ if 'cloudprovider' in facts and facts['cloudprovider']['kind'] == 'gce':
facts['node']['nodename'] = facts['provider']['metadata']['instance']['hostname'].split('.')[0]
+
+ # TODO: The openstack cloudprovider nodename setting was too opinionaed.
+ # It needs to be generalized before it can be enabled again.
+ # elif 'cloudprovider' in facts and facts['cloudprovider']['kind'] == 'openstack':
+ # facts['node']['nodename'] = facts['provider']['metadata']['hostname'].replace('.novalocal', '')
else:
facts['node']['nodename'] = facts['common']['hostname'].lower()
return facts