Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1592556

Summary: FFU: openstack overcloud upgrade run --roles Controller fails when hostnames include capital letters in HostnameMap
Product: Red Hat OpenStack Reporter: Marius Cornea <mcornea>
Component: openstack-tripleo-commonAssignee: James Slagle <jslagle>
Status: CLOSED ERRATA QA Contact: Marius Cornea <mcornea>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 13.0 (Queens)CC: aschultz, augol, dbecker, jschluet, jslagle, jstransk, mbracho, mburns, mcornea, morazi, ohochman, slinaber
Target Milestone: z2Keywords: ReleaseNotes, Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-common-8.6.1-24.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-29 16:37:32 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:
Attachments:
Description Flags
package_update.log
none
inventory.yaml none

Description Marius Cornea 2018-06-18 20:17:52 UTC
Created attachment 1452724 [details]
package_update.log

Description of problem:
FFU: openstack overcloud upgrade run --roles Controller fails when hostnames include capital letters in HostnameMap:

 u'TASK [Lookup deployment UUID] **************************************************',
 u" [WARNING]: Unable to find 'Controller/controller-r00-00/NetworkDeployment' in",
 u'expected paths.',
 u'fatal: [192.168.0.13]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin \'file\'. Error was a <class \'ansible.errors.AnsibleError\'>, original message: could not locate file in lookup: Controller/con
troller-r00-00/NetworkDeployment"}',


Version-Release number of selected component (if applicable):
openstack-tripleo-common-8.6.1-20.el7ost.noarch
openstack-tripleo-heat-templates-8.0.2-35.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy OSP10 with custom HostnameMap containing capital letters
2. Upgrade to OSP13 via the fast forward upgrade procedure
3. openstack overcloud upgrade run --roles Controller --skip-tags validation

Actual results:
Fails while running the deploy tasks with: 

Started Mistral Workflow tripleo.package_update.v1.update_nodes. Execution ID: b9051d19-f39e-446b-bfef-a6a910700562
Waiting for messages on queue 'upgrade' with no timeout.
[u'Using /tmp/ansible-mistral-actionNRZLII/ansible.cfg as config file',
 u' [WARNING]: Skipping unexpected key (hostvars) in group (_meta), only "vars",',
 u'"children" and "hosts" are valid',
 u"[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use ",
 u"'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions.",
 u' This feature will be removed in a future release. Deprecation warnings can be ',
 u'disabled by setting deprecation_warnings=False in ansible.cfg.',
 u'[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is',
 u' discouraged. The module documentation details page may explain more about this',
 u' rationale.. This feature will be removed in a future release. Deprecation ',
 u'warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.',
 u'',
 u'PLAY [Gather facts undercloud] *************************************************',
 u'skipping: no hosts matched',
 u'',
 u'PLAY [Gather facts overcloud] **************************************************',
 u'',
 u'TASK [Gathering Facts] *********************************************************',
 u'ok: [192.168.0.13]',
 u'',
 u'PLAY [Load global variables] ***************************************************',
 u'',
 u'TASK [include_vars] ************************************************************',
 u'ok: [192.168.0.13] => {"ansible_facts": {"deploy_steps_max": 6}, "ansible_included_var_files": ["/var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/global_vars.yaml"], "changed": false}',
 u'',
 u'PLAY [Bootstrap TripleO servers] ***********************************************',
 u'',
 u'TASK [tripleo-bootstrap : Deploy required packages to bootstrap TripleO] *******',
 u'ok: [192.168.0.13] => {"changed": false, "msg": "", "rc": 0, "results": ["openstack-heat-agents-1.5.4-0.20180308153305.ecf43c7.el7ost.noarch providing openstack-heat-agents is already installed", "jq-1.3-4.el7ost.x86_64 providing jq is
 already installed"]}',
 u'',
 u'TASK [tripleo-bootstrap : Create /var/lib/heat-config/tripleo-config-download directory for deployment data] ***',
 u'changed: [192.168.0.13] => {"changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/var/lib/heat-config/tripleo-config-download", "secontext": "unconfined_u:object_r:var_lib_t:s0", "size": 6, "state": "di
rectory", "uid": 0}',
 u'',
 u'PLAY [Server deployments] ******************************************************',
 u'',
 u'TASK [include] *****************************************************************',
 u'included: /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/deployments.yaml for 192.168.0.13',
 u'included: /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/deployments.yaml for 192.168.0.13',
 u'included: /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/deployments.yaml for 192.168.0.13',
 u'included: /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/deployments.yaml for 192.168.0.13',
 u'included: /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/deployments.yaml for 192.168.0.13',
 u'included: /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/deployments.yaml for 192.168.0.13',
 u'included: /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/deployments.yaml for 192.168.0.13',
 u'included: /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/deployments.yaml for 192.168.0.13',
 u'included: /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/deployments.yaml for 192.168.0.13',
 u'included: /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/deployments.yaml for 192.168.0.13',
 u'',
 u'TASK [Lookup deployment UUID] **************************************************',
 u" [WARNING]: Unable to find 'Controller/controller-r00-00/NetworkDeployment' in",
 u'expected paths.',
 u'fatal: [192.168.0.13]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin \'file\'. Error was a <class \'ansible.errors.AnsibleError\'>, original message: could not locate file in lookup: Controller/con
troller-r00-00/NetworkDeployment"}',
 u'',

Expected results:
Doesn't fail.

Additional info:

There is no Controller/controller-r00-00/NetworkDeployment(lower case controller hostname) file present but Controller/CONTROLLER-R00-00/NetworkDeployment(upper case controller hostname as defined in HostnameMap):

[root@undercloud-0 ~]# ls -l /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/CONTROLLER-R00-00/NetworkDeployment 
-rw-r--r--. 1 mistral mistral 10968 Jun 18 16:04 /var/lib/mistral/b9051d19-f39e-446b-bfef-a6a910700562/Controller/CONTROLLER-R00-00/NetworkDeployment

Deploy command:

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 ~/openstack_deployment/environments/nodes.yaml \
-e ~/openstack_deployment/environments/network-environment.yaml \
-e ~/openstack_deployment/environments/scheduler_hints_env.yaml \

environment file containing HostnameMap:

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


Attaching /var/log/mistral/package_update.log.

Comment 2 James Slagle 2018-06-19 12:40:41 UTC
We should just force everything to lowercase in tripleo_common.

I'm curious what the inventory file looks like in this case though. Can you show attach it?

Comment 3 Marius Cornea 2018-06-19 12:54:09 UTC
Created attachment 1452942 [details]
inventory.yaml

Attaching the inventory file.

Comment 6 Marius Cornea 2018-07-06 14:04:43 UTC
I tested the queens patch - https://review.openstack.org/#/c/580352/ and it addresses the issue reported initially. Can we get it in a downstream build?

Comment 16 Joanne O'Flynn 2018-08-15 07:39:12 UTC
This bug is marked for inclusion in the errata but does not currently contain draft documentation text. To ensure the timely release of this advisory please provide draft documentation text for this bug as soon as possible.

If you do not think this bug requires errata documentation, set the requires_doc_text flag to "-".


To add draft documentation text:

* Select the documentation type from the "Doc Type" drop down field.

* A template will be provided in the "Doc Text" field based on the "Doc Type" value selected. Enter draft text in the "Doc Text" field.

Comment 18 errata-xmlrpc 2018-08-29 16:37:32 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-2018:2574

Comment 19 Red Hat Bugzilla 2023-09-14 04:29:55 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days