Red Hat Bugzilla – Bug 1592556
FFU: openstack overcloud upgrade run --roles Controller fails when hostnames include capital letters in HostnameMap
Last modified: 2018-08-29 12:38:25 EDT
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.
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?
Created attachment 1452942 [details] inventory.yaml Attaching the inventory file.
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?
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.
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