Bug 1382062 - Upper case letters in HostnameFormat parameters cause trouble
Summary: Upper case letters in HostnameFormat parameters cause trouble
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Upstream M2
: 12.0 (Pike)
Assignee: Alex Schultz
QA Contact: Gurenko Alex
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-05 15:56 UTC by Jiri Stransky
Modified: 2021-03-11 14:44 UTC (History)
12 users (show)

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:
Clone Of:
Environment:
Last Closed: 2017-12-13 20:46:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1698190 0 None None None 2017-06-15 19:36:33 UTC
Launchpad 1698201 0 None None None 2017-06-15 19:35:59 UTC
OpenStack gerrit 474737 0 'None' MERGED Fix redis when hostname has capital letters 2020-07-09 08:52:30 UTC
OpenStack gerrit 474762 0 'None' MERGED Ignore case for bootstrap node checks 2020-07-09 08:52:30 UTC
Red Hat Knowledge Base (Solution) 3248711 0 None None None 2017-11-22 06:45:20 UTC
Red Hat Product Errata RHEA-2017:3462 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-16 01:43:25 UTC


Description Jiri Stransky 2016-10-05 15:56:26 UTC
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 16:16:30 UTC
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 13:00:41 UTC
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 18:38:37 UTC
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 19:23:46 UTC
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 07:38:35 UTC
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 15:56:18 UTC
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 20:46:56 UTC
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.