Bug 1563866

Summary: FFU: nova computes names change after updating the stack outputs
Product: Red Hat OpenStack Reporter: Marius Cornea <mcornea>
Component: openstack-tripleo-heat-templatesAssignee: Emilien Macchi <emacchi>
Status: CLOSED ERRATA QA Contact: Marius Cornea <mcornea>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 13.0 (Queens)CC: aschultz, dbecker, jfrancoa, jschluet, mbracho, mburns, morazi, rhel-osp-director-maint, sathlang, sclewis
Target Milestone: betaKeywords: Triaged
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-8.0.2-0.20180414062830.5f869f2.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-27 13:50:03 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:

Description Marius Cornea 2018-04-04 23:47:37 UTC
Description of problem:
FFU: nova computes names change after updating stack outputs

Version-Release number of selected component (if applicable):
openstack-tripleo-heat-templates-8.0.2-0.20180327213843.f25e2d8.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy OSP10 with 3 controller + 2 computes + 3 ceph nodes and override the HostnameMap
2. Upgrade undercloud to OSP11/12/13
3. Run deploy command to update the stack outputs:

source ~/stackrc
export THT=/usr/share/openstack-tripleo-heat-templates/
openstack overcloud deploy --templates /usr/share/openstack-tripleo-heat-templates \
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/network-management.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/tls-endpoints-public-ip.yaml \
-e ~/openstack_deployment/environments/enable-cpu-pinning.yaml \
-e ~/openstack_deployment/environments/nodes.yaml \
-e ~/openstack_deployment/environments/network-environment.yaml \
-e ~/openstack_deployment/environments/disk-layout.yaml \
-e ~/openstack_deployment/environments/public_vip.yaml \
-e ~/openstack_deployment/environments/enable-tls.yaml \
-e ~/openstack_deployment/environments/inject-trust-anchor.yaml \
-e ~/openstack_deployment/environments/scheduler_hints_env.yaml \
-e ~/openstack_deployment/environments/ips-from-pool-all.yaml \
-e ~/openstack_deployment/environments/neutron-settings.yaml \
-e ~/openstack_deployment/environments/custom_hiera.yaml \
-e /home/stack/virt/docker-images.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/fast-forward-upgrade.yaml \
-e /home/stack/ffu_repos.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/config-download-environment.yaml \
-e /home/stack/ceph-ansible-env.yaml \


Actual results:

(undercloud) [stack@undercloud-0 ~]$ nova list
+--------------------------------------+-------------------------+--------+------------+-------------+-----------------------+
| ID                                   | Name                    | Status | Task State | Power State | Networks              |
+--------------------------------------+-------------------------+--------+------------+-------------+-----------------------+
| 03191f87-4be8-49ba-9887-d8c9cd07a830 | cephosd-r00-00          | ACTIVE | -          | Running     | ctlplane=192.168.0.26 |
| 81473264-5b08-4a7c-b539-c31598fe3776 | cephosd-r01-01          | ACTIVE | -          | Running     | ctlplane=192.168.0.18 |
| a965be6b-9e74-42b7-af84-30af12d49c41 | cephosd-r02-02          | ACTIVE | -          | Running     | ctlplane=192.168.0.17 |
| 83953a64-7058-4b1b-be25-39b198d39684 | controller-r00-00       | ACTIVE | -          | Running     | ctlplane=192.168.0.15 |
| 6a8a4975-e9e3-433b-ad36-f1cf041dfae1 | controller-r01-01       | ACTIVE | -          | Running     | ctlplane=192.168.0.13 |
| c2f03751-33bc-4c74-8d68-2d1146556df0 | controller-r02-02       | ACTIVE | -          | Running     | ctlplane=192.168.0.22 |
| 283cfa7e-6b84-4a1f-8e5c-dd64102df15a | overcloud-novacompute-0 | ACTIVE | -          | Running     | ctlplane=192.168.0.11 |
| 993f769d-d254-4e53-817a-b8e7c4e41079 | overcloud-novacompute-1 | ACTIVE | -          | Running     | ctlplane=192.168.0.14 |
+--------------------------------------+-------------------------+--------+------------+-------------+-----------------------+


Expected results:
(undercloud) [stack@undercloud-0 ~]$ nova list
+--------------------------------------+-------------------+--------+------------+-------------+-----------------------+
| ID                                   | Name              | Status | Task State | Power State | Networks              |
+--------------------------------------+-------------------+--------+------------+-------------+-----------------------+
| 03191f87-4be8-49ba-9887-d8c9cd07a830 | cephosd-r00-00    | ACTIVE | -          | Running     | ctlplane=192.168.0.26 |
| 81473264-5b08-4a7c-b539-c31598fe3776 | cephosd-r01-01    | ACTIVE | -          | Running     | ctlplane=192.168.0.18 |
| a965be6b-9e74-42b7-af84-30af12d49c41 | cephosd-r02-02    | ACTIVE | -          | Running     | ctlplane=192.168.0.17 |
| 283cfa7e-6b84-4a1f-8e5c-dd64102df15a | compute-r00-00    | ACTIVE | -          | Running     | ctlplane=192.168.0.11 |
| 993f769d-d254-4e53-817a-b8e7c4e41079 | compute-r01-01    | ACTIVE | -          | Running     | ctlplane=192.168.0.14 |
| 83953a64-7058-4b1b-be25-39b198d39684 | controller-r00-00 | ACTIVE | -          | Running     | ctlplane=192.168.0.15 |
| 6a8a4975-e9e3-433b-ad36-f1cf041dfae1 | controller-r01-01 | ACTIVE | -          | Running     | ctlplane=192.168.0.13 |
| c2f03751-33bc-4c74-8d68-2d1146556df0 | controller-r02-02 | ACTIVE | -          | Running     | ctlplane=192.168.0.22 |
+--------------------------------------+-------------------+--------+------------+-------------+-----------------------+


Additional info:

We can see that the compute node names got changed from compute-r00-00, compute-r01-01 to overcloud-novacompute-0, overcloud-novacompute-1 respectively which means that the HostnameMap configured during the initial deployment is no longer applied.

The HostnameMap is set in ~/openstack_deployment/environments/scheduler_hints_env.yaml:

(undercloud) [stack@undercloud-0 ~]$ cat ~/openstack_deployment/environments/scheduler_hints_env.yaml
parameter_defaults:
  ControllerSchedulerHints:
    'capabilities:node': 'controller-%index%'
  NovaComputeSchedulerHints:
    'capabilities:node': 'compute-%index%'
  CephStorageSchedulerHints:
    'capabilities:node': 'ceph-%index%'
  ObjectStorageSchedulerHints:
    'capabilities:node': 'swift-%index%'

  HostnameMap:
    overcloud-controller-0: controller-r00-00
    overcloud-controller-1: controller-r01-01
    overcloud-controller-2: controller-r02-02
    overcloud-compute-0: compute-r00-00
    overcloud-compute-1: compute-r01-01
    overcloud-cephstorage-0: cephosd-r00-00
    overcloud-cephstorage-1: cephosd-r01-01
    overcloud-cephstorage-2: cephosd-r02-02

Comment 1 Marius Cornea 2018-04-04 23:56:04 UTC
I suspect this is related to the OSP10 having HostnameFormatDefault: '%stackname%-compute-%index%'( downstream only change - see BZ#1365789) while in OSP13 we have HostnameFormatDefault: '%stackname%-novacompute-%index%'

Comment 7 errata-xmlrpc 2018-06-27 13:50:03 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-2018:2086