Bug 1907559 - Standalone environment uses localhost for UC registry when first deployed
Summary: Standalone environment uses localhost for UC registry when first deployed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: tripleo-ansible
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: beta
: 17.0
Assignee: OSP Team
QA Contact: David Rosenfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-14 17:40 UTC by James Parker
Modified: 2022-09-21 12:14 UTC (History)
4 users (show)

Fixed In Version: tripleo-ansible-3.3.1-0.20220122230520.a2b01aa.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-21 12:13:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Detailed standalone parameters and deployment action (7.87 KB, text/plain)
2020-12-14 17:40 UTC, James Parker
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1957988 0 None None None 2022-01-14 20:31:19 UTC
OpenStack gerrit 825465 0 None NEW Fix virtual host for image-serve 2022-01-20 14:51:03 UTC
Red Hat Issue Tracker OSP-12144 0 None None None 2022-01-14 20:32:59 UTC
Red Hat Product Errata RHEA-2022:6543 0 None None None 2022-09-21 12:14:31 UTC

Description James Parker 2020-12-14 17:40:40 UTC
Created attachment 1739034 [details]
Detailed standalone parameters and deployment action

Description of problem:
When deploying a standalone environment, system will default to localhost for the undercloud registry instead of the hostname when deploying for the first time.  When redeploying the UC ctlplane hostname will have been added to /etc/hosts so it will use the correct hostname when attempting to access the undercloud container regsitry

TASK [include_tasks] **********************************************************************************************************************************************************************
Monday 14 December 2020  12:08:45 -0500 (0:00:00.094)       0:03:57.194 *******
included: /home/stack/standalone-ansible-gqj_bg07/Standalone/deploy_steps_tasks_step1.yaml for intel-purley-lr-04

TASK [tripleo-container-tag : Fail if container image is undefined] ***********************************************************************************************************************
Monday 14 December 2020  12:08:45 -0500 (0:00:00.159)       0:03:57.353 *******
skipping: [intel-purley-lr-04]

TASK [tripleo-container-tag : Pull localhost:8787/rh-osbs/rhosp16-openstack-cinder-volume:16.1_20201202.1 image] **************************************************************************
Monday 14 December 2020  12:08:45 -0500 (0:00:00.096)       0:03:57.450 *******
fatal: [intel-purley-lr-04]: FAILED! => {"changed": true, "cmd": "podman pull localhost:8787/rh-osbs/rhosp16-openstack-cinder-volume:16.1_20201202.1", "delta": "0:00:00.064277", "end": "2020-12-14 17:08:45.857774", "msg": "non-zero return code", "rc": 125, "start": "2020-12-14 17:08:45.793497", "stderr": "Trying to pull localhost:8787/rh-osbs/rhosp16-openstack-cinder-volume:16.1_20201202.1...\n  Get https://localhost:8787/v2/: http: server gave HTTP response to HTTPS client\nError: error pulling image \"localhost:8787/rh-osbs/rhosp16-openstack-cinder-volume:16.1_20201202.1\": unable to pull localhost:8787/rh-osbs/rhosp16-openstack-cinder-volume:16.1_20201202.1: unable to pull image: Error initializing source docker://localhost:8787/rh-osbs/rhosp16-openstack-cinder-volume:16.1_20201202.1: error pinging docker registry localhost:8787: Get https://localhost:8787/v2/: http: server gave HTTP response to HTTPS client", "stderr_lines": ["Trying to pull localhost:8787/rh-osbs/rhosp16-openstack-cinder-volume:16.1_20201202.1...", "  Get https://localhost:8787/v2/: http: server gave HTTP response to HTTPS client", "Error: error pulling image \"localhost:8787/rh-osbs/rhosp16-openstack-cinder-volume:16.1_20201202.1\": unable to pull localhost:8787/rh-osbs/rhosp16-openstack-cinder-volume:16.1_20201202.1: unable to pull image: Error initializing source docker://localhost:8787/rh-osbs/rhosp16-openstack-cinder-volume:16.1_20201202.1: error pinging docker registry localhost:8787: Get https://localhost:8787/v2/: http: server gave HTTP response to HTTPS client"], "stdout": "", "stdout_lines": []}

NO MORE HOSTS LEFT ************************************************************************************************************************************************************************

PLAY RECAP ********************************************************************************************************************************************************************************
intel-purley-lr-04         : ok=170  changed=106  unreachable=0    failed=1    skipped=41   rescued=0    ignored=0
undercloud                 : ok=23   changed=15   unreachable=0    failed=0    skipped=1    rescued=0    ignored=0



Version-Release number of selected component (if applicable):
16.1

How reproducible:
100% on fresh deployment attempt, second attempt will not have the issue

Steps to Reproduce:
Full details in attachment (standalone_deployment_failure)
1. Deploy standalone fresh standalone deployment.
2.
3.

Actual results:
Deployment attempts to use localhost when accessing container registry

Expected results:
Standalone (All-in-one) deployment uses the hostname when attempting to access the undercloud container registry

Additional info:

Comment 1 Alex Schultz 2020-12-14 21:28:18 UTC
Do not use push_destination: true in the container-image-prepare.yaml when deploying the all-in-one.

Comment 2 Cédric Jeanneret 2020-12-17 07:24:04 UTC
Hello James,

Would it be possible to provide the content of the /etc/hosts? Apparently there is a detection being done that wants to match the hostname on the ctlplane network, maybe it's just missing this bit (even for standalone)..

Cheers,

C.

Comment 3 James Parker 2020-12-17 15:23:38 UTC
Hi Cédric,

Correct the ctlplane mapping is not present in the hosts file whenever I attempt to deploy for the first time on a newly provisioned beaker host. The subsequent deployment attempt will work since the /etc/hosts file is updated with the ctlplane network info.  Info listed below.

Regards,
-James

# Before deploying
[root@intel-purley-lr-04 ~]# cat /etc/hosts 
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

# During first deploy attempt
......
jinja2 rendering roles Standalone
rendering j2 template to file: /home/stack/tripleo-heat-installer-templates/./puppet/standalone-role.yaml
No entry for intel-purley-lr-04.ctlplane in /etc/hosts. Falling back to use the default (localhost) undercloud registry.
No entry for intel-purley-lr-04.ctlplane in /etc/hosts. Falling back to use the default (localhost) undercloud registry.
** Performing Heat stack create.. **
.....

Exception: Deployment failed
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/tripleo_deploy.py", line 1328, in _standalone_deploy
    raise exceptions.DeploymentError('Deployment failed')
tripleoclient.exceptions.DeploymentError: Deployment failed
None
Not cleaning working directory /home/stack/tripleo-heat-installer-templates
Not cleaning ansible directory /home/stack/standalone-ansible-gqj_bg07
Install artifact is located at /home/stack/standalone-install-20201214170846.tar.bzip2

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Deployment Failed!

ERROR: Heat log files: /var/log/heat-launcher/undercloud_deploy-bza_001b

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Deployment failed.

# /etc/hosts has been updated with ctlplane mappings and second attempt to deploy will now work


[stack@intel-purley-lr-04 ~]$ cat /etc/hosts 
# BEGIN ANSIBLE MANAGED BLOCK
192.168.24.101 intel-purley-lr-04.localdomain intel-purley-lr-04
192.168.24.101 intel-purley-lr-04.ctlplane.localdomain intel-purley-lr-04.ctlplane

# END ANSIBLE MANAGED BLOCK
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.46.9.32  rhos-qe-mirror-tlv.usersys.redhat.com download.lab.bos.redhat.com download.eng.bos.redhat.com download-node-02.eng.bos.redhat.com

Comment 4 Alex Schultz 2022-01-14 20:37:32 UTC
Moving to OSP17 for now as we can probably address it for there. Given the standalone configuration is mostly for development purposes, we probably won't backport to 16.1.

Comment 12 errata-xmlrpc 2022-09-21 12:13:24 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 (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), 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-2022:6543


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