Bug 2009422 - Deployment failing due to "Create /etc/openstack directory if it does not exist" task
Summary: Deployment failing due to "Create /etc/openstack directory if it does not exi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z2
: 16.2 (Train on RHEL 8.4)
Assignee: OSP Team
QA Contact: Joe H. Rahme
URL:
Whiteboard:
Depends On: 2006772
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-30 15:44 UTC by Alex Schultz
Modified: 2022-03-23 22:30 UTC (History)
5 users (show)

Fixed In Version: openstack-tripleo-heat-templates-11.6.1-2.20220116004909.64b2e88.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2006772
Environment:
Last Closed: 2022-03-23 22:29:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-10060 0 None None None 2021-11-15 12:42:27 UTC
Red Hat Product Errata RHSA-2022:0995 0 None None None 2022-03-23 22:30:03 UTC

Description Alex Schultz 2021-09-30 15:44:04 UTC
+++ This bug was initially created as a clone of Bug #2006772 +++

Description of problem:
While trying to complete undercloud upgrade from RHOSP16.1.5 to RHOSP16.2 the deployment fails with the following error:
~~~
[  admin] TASK [Create /etc/openstack directory if it does not exist] ********************************************************
[  admin] fatal: [director -> undercloud]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname undercloud: Name or service not known", "unreachable": true}
[  admin] NO MORE HOSTS LEFT *************************************************************************************************
[  admin] PLAY RECAP *********************************************************************************************************
[  admin] director                   : ok=14   changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0
[  admin] Exception: Post Upgrade failed

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Deployment Failed!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

ERROR openstack [  admin] Deployment failed.
ERROR tripleoclient.v1.undercloud.UpgradeUndercloud [  ]

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
An error has occured while deploying the Undercloud.
See the previous output for details about what went wrong.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
~~~


Checking the undercloud upgrade tarball I can see this in the inventory:
~~~
Undercloud:
  hosts:
    director: {ansible_host: 192.168.24.1, canonical_hostname: director.localdomain,
      ctlplane_hostname: director.ctlplane.localdomain, ctlplane_ip: 192.168.24.1,
      deploy_server_id: a081cb61-5302-4134-9684-490d633392c6, external_hostname: director.external.localdomain,
      external_ip: 192.168.24.1}
~~~

So we can see that it's trying to target the "undercloud" hostname but my undercloud hostname is "director"

Updating "delegate_to: undercloud" to delegate_to: "{{ groups['Undercloud'][0] }}" I was able to pass this issue:

https://review.opendev.org/c/openstack/tripleo-heat-templates/+/810345

Version-Release number of selected component (if applicable):
openstack-tripleo-heat-templates-11.5.1-2.20210603174823.el8ost.9.noarch
Red Hat OpenStack Platform release 16.2.0 GA (Train)


How reproducible:
Every time

Steps to Reproduce:
1.Follow minor update guide
2.Once you get to openstack undercloud upgrade it will fail with the above message

Actual results:
Undercloud upgrade fails

Expected results:
Undercloud upgrade to complete sucessfully

Comment 6 David Rosenfeld 2022-01-31 20:36:31 UTC
Deployment with an undercloud hostname of director-0 is successful:

(undercloud) [stack@director-0 ~]$ hostname
director-0.redhat.local

(undercloud) [stack@director-0 ~]$ openstack server list
+--------------------------------------+--------------+--------+------------------------+----------------+------------+
| ID                                   | Name         | Status | Networks               | Image          | Flavor     |
+--------------------------------------+--------------+--------+------------------------+----------------+------------+
| eff90fd6-8f26-46d9-b3f6-f38bfef81004 | controller-0 | ACTIVE | ctlplane=192.168.24.11 | overcloud-full | controller |
| 8d3c397f-d58d-4948-9501-b3ae2a527330 | compute-0    | ACTIVE | ctlplane=192.168.24.52 | overcloud-full | compute    |
| 19d5d341-cf9e-4580-9f52-a6421ee115f7 | ceph-2       | ACTIVE | ctlplane=192.168.24.12 | overcloud-full | ceph       |
| d48790e1-3cf6-479b-ae28-5c2466e693a5 | ceph-1       | ACTIVE | ctlplane=192.168.24.21 | overcloud-full | ceph       |
| 2b658bfe-2d70-4f4f-8249-419d5c080eeb | ceph-0       | ACTIVE | ctlplane=192.168.24.7  | overcloud-full | ceph       |
+--------------------------------------+--------------+--------+------------------------+----------------+------------+

Comment 16 errata-xmlrpc 2022-03-23 22:29: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 (Moderate: Red Hat OpenStack Platform 16.2 (openstack-tripleo-heat-templates) security update), 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/RHSA-2022:0995


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