Bug 1762303 - Undercloud registry relative redirect follow
Summary: Undercloud registry relative redirect follow
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-common
Version: 16.0 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: beta
: 16.0 (Train on RHEL 8.1)
Assignee: Harald Jensås
QA Contact: Sasha Smolyak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-16 13:10 UTC by Attila Fazekas
Modified: 2020-02-06 14:43 UTC (History)
8 users (show)

Fixed In Version: python-tripleo-common-tests-tempest-0.0.1-0.20191108205902.b692955.el8ost openstack-tripleo-common-11.3.2-0.20191126040433.7cebd8b.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-06 14:42:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1849140 0 None None None 2019-10-21 15:29:41 UTC
OpenStack gerrit 689068 0 'None' MERGED Use name for container registry 2021-02-04 16:10:35 UTC
OpenStack gerrit 689928 0 'None' MERGED Fix py3 issue in get_undercloud_registry() 2021-02-04 16:10:34 UTC
Red Hat Product Errata RHEA-2020:0283 0 None None None 2020-02-06 14:43:30 UTC

Description Attila Fazekas 2019-10-16 13:10:32 UTC
Failed to upload images:


/etc/httpd/conf.d/image-serve.conf:
    RedirectMatch ^/$ /v2


/var/log/tripleo-container-image-prepare.log:
bject at 0x7fe20f1264a8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /v2/
2019-10-16 12:21:35,108 14982 DEBUG urllib3.connectionpool [  ] Starting new HTTPS connection (9): b'undercloud-0.ctlplane.localdomain':8787
2019-10-16 12:21:35,108 14982 ERROR root [  ] Image prepare failed: HTTPSConnectionPool(host="b'undercloud-0.ctlplane.localdomain'", port=8787): Max retries exceeded with url: /v2/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe20f126b00>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 57, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib64/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):


version:
openstack-tripleo-puppet-elements-11.1.1-0.20190916195001.32c74e4.el8ost.noarch
python3-tripleoclient-12.2.1-0.20191014182840.8ce8b93.el8ost.noarch
python3-tripleo-common-11.2.1-0.20191015071308.027a33b.el8ost.noarch
openstack-tripleo-common-11.2.1-0.20191015071308.027a33b.el8ost.noarch
puppet-tripleo-11.2.1-0.20191015144700.11c9839.el8ost.noarch
openstack-tripleo-image-elements-10.5.2-0.20191014184551.bcb1e64.el8ost.noarch
ansible-tripleo-ipsec-9.1.1-0.20190513184224.ffe104c.el8ost.noarch
openstack-tripleo-validations-11.2.1-0.20191015144707.b1d1af3.el8ost.noarch
openstack-tripleo-heat-templates-11.2.1-0.20191015080513.28d7724.el8ost.noarch
ansible-role-tripleo-modify-image-1.1.1-0.20191004184828.589486e.el8ost.noarch
tripleo-ansible-0.3.1-0.20191014191841.00c45cf.el8ost.noarch
python3-tripleoclient-heat-installer-12.2.1-0.20191014182840.8ce8b93.el8ost.noarch
openstack-tripleo-common-containers-11.2.1-0.20191015071308.027a33b.el8ost.noarch

python3-urllib3-1.24.2-2.el8.noarch

RHOS_TRUNK-16.0-RHEL-8-20191015.n.1

Comment 8 Harald Jensås 2019-10-18 07:02:51 UTC
Moved to POST, https://review.opendev.org/689068 merged upstream.

Comment 10 Harald Jensås 2019-10-21 14:53:44 UTC
This is a py2 vs py3 issue.

Python 2.7.5 (default, Aug  7 2019, 00:51:29) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> import socket
>>>
>>> ctlplane_hostname = '.'.join([socket.gethostname().split('.')[0],  'ctlplane'])
>>> cmd = ['getent', 'hosts', ctlplane_hostname]
>>> process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
>>> out, err = process.communicate()
>>> address = out.split()[1]
>>> type(address)
<type 'str'>


Python 3.6.8 (default, Jun  7 2019, 12:46:56)
[GCC 8.3.1 20190507 (Red Hat 8.3.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> import socket
>>>
>>> ctlplane_hostname = '.'.join([socket.gethostname().split('.')[0],  'ctlplane'])
>>> cmd = ['getent', 'hosts', ctlplane_hostname]
>>> process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
>>> out, err = process.communicate()
>>> address = out.split()[1]
>>> type(address)
<class 'bytes'>

Comment 13 Bob Fournier 2020-01-03 13:06:33 UTC
Per the Trello card, this has been verified - https://trello.com/c/kIidTGbi/1185-cixbz1762303ospphase1osp16tripleo-commondfimage-upload-failed and is no longer being seen in CI.

Comment 16 errata-xmlrpc 2020-02-06 14:42:47 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/RHEA-2020:0283


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