diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-08-23 19:51:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-23 19:51:19 -0400 |
commit | a535b7e99fbaff4bc8ee10bbedf8c47d4aabe94c (patch) | |
tree | f8aa880f5ded0005ed520da4163c358884db812d /roles/openshift_facts | |
parent | b8e45471aa70881ff608962f0fec236c31c2398d (diff) | |
parent | 825c187c07d592838aac20c41848b336835ef3b5 (diff) | |
download | openshift-a535b7e99fbaff4bc8ee10bbedf8c47d4aabe94c.tar.gz openshift-a535b7e99fbaff4bc8ee10bbedf8c47d4aabe94c.tar.bz2 openshift-a535b7e99fbaff4bc8ee10bbedf8c47d4aabe94c.tar.xz openshift-a535b7e99fbaff4bc8ee10bbedf8c47d4aabe94c.zip |
Merge pull request #5100 from mgugino-upstream-stage/check-hostname-len
Add hostname/nodename length check
Diffstat (limited to 'roles/openshift_facts')
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 844d77255..251d1dfb4 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -193,7 +193,9 @@ def hostname_valid(hostname): """ if (not hostname or hostname.startswith('localhost') or - hostname.endswith('localdomain')): + hostname.endswith('localdomain') or + # OpenShift will not allow a node with more than 63 chars in name. + len(hostname) > 63): return False return True |