Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1382062 - Upper case letters in HostnameFormat parameters cause trouble
Upper case letters in HostnameFormat parameters cause trouble
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates (Show other bugs)
10.0 (Newton)
Unspecified Unspecified
medium Severity medium
: Upstream M2
: 12.0 (Pike)
Assigned To: Alex Schultz
Gurenko Alex
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-05 11:56 EDT by Jiri Stransky
Modified: 2018-06-12 15:36 EDT (History)
12 users (show)

See Also:
Fixed In Version: openstack-tripleo-heat-templates-7.0.0-0.20170616123155.el7ost puppet-tripleo-7.1.1-0.20170623015402.2625756.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-13 15:46:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1698190 None None None 2017-06-15 15:36 EDT
Launchpad 1698201 None None None 2017-06-15 15:35 EDT
Red Hat Knowledge Base (Solution) 3248711 None None None 2017-11-22 01:45 EST
OpenStack gerrit 474737 None None None 2017-06-15 15:19 EDT
OpenStack gerrit 474762 None None None 2017-06-15 16:02 EDT
Red Hat Product Errata RHEA-2017:3462 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-15 20:43:25 EST

  None (edit)
Description Jiri Stransky 2016-10-05 11:56:26 EDT
If one uses uppercase letters to name Nova servers, e.g.:

ControllerHostnameFormat: 'CONTROLLER%index%'

Then the uppercase is used on Nova/Heat side to refer to the machine, but the actual hostname is lower case.

# hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid
CONTROLLER0

# facter hostname
controller0

This causes the bootstrap node checks to not work, which breaks dependent features like upgrades/updates and restarts on config change.
Comment 1 Jiri Stransky 2016-10-05 12:16:30 EDT
The problems could be deeper than just the bootstrap node checks, e.g. see:

[root@controller0 hieradata]# grep -r CONTROLLER /etc/puppet/hieradata/
/etc/puppet/hieradata/controller.yaml:bootstack_nodeid: CONTROLLER0
/etc/puppet/hieradata/bootstrap_node.yaml:bootstrap_nodeid: CONTROLLER0
/etc/puppet/hieradata/ceph_cluster.yaml:ceph_mon_initial_members: CONTROLLER0,CONTROLLER1,CONTROLLER2
/etc/puppet/hieradata/all_nodes.yaml:controller_node_names: CONTROLLER0,CONTROLLER1,CONTROLLER2
/etc/puppet/hieradata/all_nodes.yaml:galera_node_names: CONTROLLER0,CONTROLLER1,CONTROLLER2

I wonder if we should simply disallow uppercase letters in the *HostnameFormat parameters.
Comment 2 James Slagle 2017-03-01 08:00:41 EST
i think the right fix here is to make the bootstrap node hostname checks case insensitive, as hostnames are generally considered case insensitive
Comment 3 Alex Schultz 2017-06-15 14:38:37 EDT
Do we have any specific errors around this? I only see redis and mongo not correctly using downcase($bootstrap_nodeid). I will fix those but unless we have some additional information, this shouldn't be an issue.
Comment 4 Alex Schultz 2017-06-15 15:23:46 EDT
It looks like we also don't have the same case insensitive comparisons in the THT scripts. so i'm looking into those as well but any specific errors would be handy
Comment 5 Jiri Stransky 2017-06-16 03:38:35 EDT
The issue we actually hit was just with the bootstrap node check, which i think is handled by https://review.openstack.org/474762
Comment 10 Omri Hochman 2017-11-16 10:56:18 EST
verified with openstack-tripleo-heat-templates-7.0.3-3.el7ost.noarch


[root@undercloud74 ~]# cat /usr/share/openstack-puppet/modules/tripleo/manifests/profile/base/database/redis.pp | grep downcase
    if downcase($bootstrap_nodeid) == $::hostname {
Comment 15 errata-xmlrpc 2017-12-13 15:46:56 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3462

Note You need to log in before you can comment on or make changes to this bug.