Bug 1532850

Summary: (newton backport) Upper case letters in HostnameFormat parameters cause trouble
Product: Red Hat OpenStack Reporter: Emilien Macchi <emacchi>
Component: openstack-tripleo-heat-templatesAssignee: Emilien Macchi <emacchi>
Status: CLOSED ERRATA QA Contact: Gurenko Alex <agurenko>
Severity: medium Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: agurenko, dcadzow, djuran, emacchi, mburns, michal.przybyl, rhel-osp-director-maint
Target Milestone: asyncKeywords: FeatureBackport, Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-5.3.10-22.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1532610 Environment:
Last Closed: 2019-01-16 17:09:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1532610, 1532852    
Bug Blocks:    

Description Emilien Macchi 2018-01-09 21:59:09 UTC
+++ This bug was initially created as a clone of Bug #1532610 +++

Hello, 
Please backport solution suggested in:
https://access.redhat.com/support/cases/#/case/01988025


Description of problem:
Hello,
During out update process from OSP8 to OSP9 we hit problem with script:
/usr/share/openstack-tripleo-heat-templates/extraconfig/tasks/major_upgrade_pacemaker_migrations.sh
in if:
'if [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname)" ]; then'
This is always false because:
hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid
NCEOSPCTL0
and,
[root@nceospctl0 heat-config-script]# facter hostname
nceospctl0.

Because of that pacemaker update is never executed and upgrading failed.

We are using uppercase names in our deployment configuration:
parameter_defaults:
  ControllerHostnameFormat: 'NCEOSPCTL%index%'
  ComputeHostnameFormat: 'NCEOSPCPU%index%'
...
We noticed similar bug in different files :
https://bugzilla.redhat.com/show_bug.cgi?id=1382062

Have a nice day,
Michal

Where are you experiencing the behavior?  What environment?

OSP8 to OSP9 upgrade, expecting same on OSP9 to OSP10 upgrade.

Version-Release number of selected component (if applicable):


How reproducible:
Just use capital letters in hostnames

Actual results:



Expected results:


Additional info:
Support case:
https://access.redhat.com/support/cases/#/case/01988025

Comment 6 Gurenko Alex 2019-01-10 11:33:37 UTC
Successfully deployed with said name patter:

[stack@undercloud-0 ~]$ openstack server list
+--------------------------------------+------------+--------+------------------------+----------------+
| ID                                   | Name       | Status | Networks               | Image Name     |
+--------------------------------------+------------+--------+------------------------+----------------+
| fafd618a-29c1-4106-96da-36dd7138eed3 | NCEOSPCTL1 | ACTIVE | ctlplane=192.168.24.14 | overcloud-full |
| 77bda9db-3ef0-415d-b5fe-d4b333d329a2 | ceph-0     | ACTIVE | ctlplane=192.168.24.11 | overcloud-full |
| 6d376400-70d6-4993-bf07-4fe7293b6e40 | NCEOSPCPU0 | ACTIVE | ctlplane=192.168.24.17 | overcloud-full |
| e999d92d-ae63-4db9-97c6-830900c13e42 | ceph-2     | ACTIVE | ctlplane=192.168.24.16 | overcloud-full |
| 25e4b07f-408a-4e09-9625-9c068b4c6b62 | NCEOSPCTL2 | ACTIVE | ctlplane=192.168.24.15 | overcloud-full |
| 71831b13-7374-4113-81ff-c9fb5e124059 | NCEOSPCPU1 | ACTIVE | ctlplane=192.168.24.8  | overcloud-full |
| 073afad3-6b88-41d5-88ff-dd2236d68d9f | NCEOSPCTL0 | ACTIVE | ctlplane=192.168.24.13 | overcloud-full |
| f22f1613-b341-4af7-9f26-d2b3c26736df | ceph-1     | ACTIVE | ctlplane=192.168.24.12 | overcloud-full |
+--------------------------------------+------------+--------+------------------------+----------------+

Verified on puddle: 2019-01-03.2

[stack@undercloud-0 ~]$ rpm -q openstack-tripleo-heat-templates
openstack-tripleo-heat-templates-5.3.10-23.el7ost.noarch

Comment 8 errata-xmlrpc 2019-01-16 17:09:41 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/RHBA-2019:0055