Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1592556 - FFU: openstack overcloud upgrade run --roles Controller fails when hostnames include capital letters in HostnameMap [NEEDINFO]
FFU: openstack overcloud upgrade run --roles Controller fails when hostnames ...
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-common (Show other bugs)
13.0 (Queens)
Unspecified Unspecified
urgent Severity urgent
: z2
: 13.0 (Queens)
Assigned To: James Slagle
Marius Cornea
: ReleaseNotes, Triaged, ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-06-18 16:17 EDT by Marius Cornea
Modified: 2018-08-29 12:38 EDT (History)
12 users (show)

See Also:
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 12:37:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
joflynn: needinfo? (jslagle)


Attachments (Terms of Use)
package_update.log (3.11 MB, text/plain)
2018-06-18 16:17 EDT, Marius Cornea
no flags Details
inventory.yaml (409.67 KB, text/plain)
2018-06-19 08:54 EDT, Marius Cornea
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1777660 None None None 2018-06-19 10:31 EDT
OpenStack gerrit 576534 None master: MERGED tripleo-common: Force lowercase hostnames (If9365f53c215c656cc558f07fd6651dd4a471fbf) 2018-07-18 14:14 EDT
OpenStack gerrit 580352 None stable/queens: MERGED tripleo-common: Force lowercase hostnames (If9365f53c215c656cc558f07fd6651dd4a471fbf) 2018-07-18 14:14 EDT
Red Hat Product Errata RHBA-2018:2574 None None None 2018-08-29 12:38 EDT

  None (edit)
Description Marius Cornea 2018-06-18 16:17:52 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.
Comment 2 James Slagle 2018-06-19 08:40:41 EDT
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 08:54 EDT
Created attachment 1452942 [details]
inventory.yaml

Attaching the inventory file.
Comment 6 Marius Cornea 2018-07-06 10:04:43 EDT
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 03:39:12 EDT
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 12:37:32 EDT
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

Note You need to log in before you can comment on or make changes to this bug.