Bug 1892143
| Summary: | OpenStack client fails due to dependency issues with urllib3 (1.10.2) or chardet (3.0.4) | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Mohammad <mahmad> |
| Component: | Release | Assignee: | Jesus M. Rodriguez <jesusr> |
| Status: | CLOSED ERRATA | QA Contact: | Gaoyun Pei <gpei> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.11.0 | CC: | aos-bugs, apevec, emacchi, gchamoul, gpei, jdelft, jesusr, jpichon, lhh, mburns, pprinett, rdopiera |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | 3.11.z | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-03-31 05:17:19 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Mohammad
2020-10-28 02:50:09 UTC
To clarify, the site above (https://docs.openshift.com/container-platform/3.11/install_config/configuring_openstack.html) does not lock the version, but it asks to verify the following packages use these versions: python2-openstackclient 3.14.1.-1 python2-heatclient 1.14.0-1 python2-octaviaclient 1.4.0-1 python2-openstacksdk 0.17.2 I'm not familiar with the mixed dependencies required for OpenShift + OSC together, but at a first glance python2-urllib3 not being installed seems very likely to be part of the issue since that would be causing the import failure. It's weird it didn't get installed: it's a dependency of python2-requests, which itself is a dependency of python2-keystoneauth1 so it should have come together with the SDK install. Would it be possible to install python2-urllib3-1.21.1-1.2.el7ost like on the working system, and see if that helps to move past that error at least? There'd still be some investigation work required to figure out how following the docs results in a missing dependency. Yes, this seems to resolve the issue:
(overcloud) [cloud-user@ocp-deploy ~]$ sudo yum install python2-urllib3-1.21.1-1.2.el7ost
Loaded plugins: product-id, search-disabled-repos, subscription-manager, versionlock
rhel-7-server-ansible-2.6-rpms | 4.0 kB 00:00:00
rhel-7-server-extras-rpms | 3.4 kB 00:00:00
rhel-7-server-openstack-13-rpms | 4.0 kB 00:00:00
rhel-7-server-openstack-13-tools-rpms | 3.8 kB 00:00:00
rhel-7-server-openstack-14-tools-rpms | 3.8 kB 00:00:00
rhel-7-server-ose-3.11-rpms | 4.1 kB 00:00:00
rhel-7-server-rpms | 3.5 kB 00:00:00
(1/8): rhel-7-server-extras-rpms/x86_64/primary_db | 649 kB 00:00:03
(2/8): rhel-7-server-extras-rpms/x86_64/updateinfo | 236 kB 00:00:04
(3/8): rhel-7-server-openstack-13-rpms/x86_64/updateinfo | 362 kB 00:00:04
(4/8): rhel-7-server-openstack-13-tools-rpms/x86_64/updateinfo | 54 kB 00:00:03
(5/8): rhel-7-server-openstack-13-tools-rpms/x86_64/primary_db | 56 kB 00:00:00
(6/8): rhel-7-server-ose-3.11-rpms/x86_64/updateinfo | 164 kB 00:00:00
(7/8): rhel-7-server-ose-3.11-rpms/x86_64/primary_db | 471 kB 00:00:00
(8/8): rhel-7-server-openstack-13-rpms/x86_64/primary_db | 1.5 MB 00:00:07
Excluding 4 updates due to versionlock (use "yum versionlock status" to show them)
Resolving Dependencies
--> Running transaction check
---> Package python-urllib3.noarch 0:1.10.2-7.el7 will be obsoleted
---> Package python2-urllib3.noarch 0:1.21.1-1.2.el7ost will be obsoleting
--> Processing Dependency: python-pysocks for package: python2-urllib3-1.21.1-1.2.el7ost.noarch
--> Running transaction check
---> Package python2-pysocks.noarch 0:1.5.7-4.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================
Installing:
python2-urllib3 noarch 1.21.1-1.2.el7ost rhel-7-server-openstack-13-rpms 173 k
replacing python-urllib3.noarch 1.10.2-7.el7
Installing for dependencies:
python2-pysocks noarch 1.5.7-4.el7 rhel-7-server-ose-3.11-rpms 22 k
Transaction Summary
===============================================================================================================================================================
Install 1 Package (+1 Dependent package)
Total download size: 196 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): python2-pysocks-1.5.7-4.el7.noarch.rpm | 22 kB 00:00:01
(2/2): python2-urllib3-1.21.1-1.2.el7ost.noarch.rpm | 173 kB 00:00:04
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 41 kB/s | 196 kB 00:00:04
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python2-pysocks-1.5.7-4.el7.noarch 1/3
Installing : python2-urllib3-1.21.1-1.2.el7ost.noarch 2/3
Erasing : python-urllib3-1.10.2-7.el7.noarch 3/3
Verifying : python2-pysocks-1.5.7-4.el7.noarch 1/3
Verifying : python2-urllib3-1.21.1-1.2.el7ost.noarch 2/3
Verifying : python-urllib3-1.10.2-7.el7.noarch 3/3
Installed:
python2-urllib3.noarch 0:1.21.1-1.2.el7ost
Dependency Installed:
python2-pysocks.noarch 0:1.5.7-4.el7
Replaced:
python-urllib3.noarch 0:1.10.2-7.el7
Complete!
(overcloud) [cloud-user@ocp-deploy ~]$ openstack server list
+--------------------------------------+------------+--------+-------------------------------------------+---------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+------------+--------+-------------------------------------------+---------+---------+
| b55faaa6-1c3a-4e47-b7e9-aa3ced293949 | ocp-deploy | ACTIVE | ocp-deploy=192.168.100.191, 192.168.1.249 | rhel7.9 | m1.node |
+--------------------------------------+------------+--------+-------------------------------------------+---------+---------+
(overcloud) [cloud-user@ocp-deploy ~]$ rpm -q python2-openstackclient python2-heatclient python2-octaviaclient python2-openstacksdk python2-urllib3 python2-chardet
python2-openstackclient-3.14.1-1.el7ost.noarch
python2-heatclient-1.14.0-1.el7ost.noarch
python2-octaviaclient-1.4.0-1.1.el7ost.noarch
python2-openstacksdk-0.17.2-0.20180809182657.3ad9dab.el7ost.noarch
python2-urllib3-1.21.1-1.2.el7ost.noarch
python2-chardet-3.0.4-7.el7ost.noarch
I could reproduce this issue. From a fresh RHEL 7.9, as documented in https://docs.openshift.com/container-platform/3.11/install_config/configuring_openstack.html: $ sudo subscription-manager repos --enable="rhel-7-server-rpms" \ --enable="rhel-7-server-extras-rpms" \ --enable="rhel-7-server-ose-3.11-rpms" \ --enable="rhel-7-server-ansible-2.9-rpms" $ sudo subscription-manager repos --enable rhel-7-server-openstack-13-tools-rpms \ --enable rhel-7-server-openstack-14-tools-rpms $ sudo subscription-manager repo-override --repo=rhel-7-server-openstack-14-tools-rpms --add=includepkgs:"python2-openstacksdk.* python2-keystoneauth1.* python2-os-service-types.*" $ sudo yum install -y python2-openstackclient python2-heatclient python2-octaviaclient ansible $ openstack server list /usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.10.2) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) Traceback (most recent call last): File "/usr/bin/openstack", line 6, in <module> from openstackclient.shell import main File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 22, in <module> from osc_lib.api import auth File "/usr/lib/python2.7/site-packages/osc_lib/api/auth.py", line 19, in <module> from keystoneauth1.loading import base File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/__init__.py", line 13, in <module> from keystoneauth1.loading import adapter File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/adapter.py", line 13, in <module> from keystoneauth1 import adapter File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 16, in <module> from keystoneauth1 import session File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 25, in <module> import requests File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 94, in <module> from urllib3.exceptions import DependencyWarning ImportError: cannot import name DependencyWarning It seems like python-requests should depend on a newer version of python-urllib3: $ sudo deplist python-requests-2.6.0-10.el7.noarch Loaded plugins: product-id, search-disabled-repos, subscription-manager package: python-requests.noarch 2.6.0-10.el7 dependency: ca-certificates provider: ca-certificates.noarch 2021.2.50-72.el7_9 dependency: python(abi) = 2.7 provider: python.x86_64 2.7.5-90.el7 dependency: python-chardet >= 2.2.1-1 provider: python2-chardet.noarch 3.0.4-7.el7ost provider: python-chardet.noarch 2.2.1-3.el7 dependency: python-urllib3 >= 1.10.2-1 provider: python2-urllib3.noarch 1:1.24.3-2.el7 provider: python-urllib3.noarch 1.10.2-7.el7 Installing python2-urllib3.noarch 1:1.24.3-2.el7 via `yum update` solves the issue. It's actually python2-requests coming from rhel-7-server-ose-3.11-rpms that should bump its deps. Here's what it pulled when I ran the above yum install command:
```
python2-requests noarch 2.19.1-5.el7 rhel-7-server-ose-3.11-rpms 123 k
replacing python-requests.noarch 2.6.0-10.el7
```
python-requests-2.19.1-6.el7 is available in the staging repo python-requests-2.19.1-6.el7 was added to latest 3.11 repo. ============================================================================================== Package Arch Version Repository Size ============================================================================================== Installing: python2-requests noarch 2.19.1-6.el7 rhel-7-server-ose-3.11-rpms 123 k move this as verified. 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 (OpenShift Container Platform 3.11.664 bug fix and enhancement 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/RHBA-2022:1033 |