Description of problem: ======================= In order to install OpenShift 3.11 on OpenStack 13, openstack client is required along with several other components to help create the base stack (VMs, load balancers, storage, etc.) Recently, when following the steps in https://docs.openshift.com/container-platform/3.11/install_config/configuring_openstack.html, running a basic command like `openstack server list` shows the following error: (overcloud) [cloud-user@ocp-deploy ~]$ source openrc311.sh (overcloud) [cloud-user@ocp-deploy ~]$ 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 Version-Release number of selected component (if applicable): ============================================================= (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 package python2-urllib3 is not installed python2-chardet-3.0.4-7.el7ost.noarch How reproducible: ================= By following the steps in https://docs.openshift.com/container-platform/3.11/install_config/configuring_openstack.html Steps to Reproduce: =================== 1. Create an OpenStack VM from rhel 7.9 qcow2 image 2. Subscribe the system, then disable all repos 3. Perform the following: $ 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.*" and: $ 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.6-rpms" \ --enable="rhel-7-server-openstack-13-rpms" $ sudo yum install yum-plugin-versionlock # I tried both locking the version as stated in the site above, and without locking the version, I got the same results. $ sudo yum versionlock python-openstackclient-lang-3.14.1 python2-openstacksdk-0.17.2 python2-openstackclient-3.14.1 python2-heatclient-1.14.0 python2-octaviaclient-1.4.0 $ sudo yum -y install openshift-ansible python-openstackclient python2-heatclient python2-octaviaclient python2-shade python-dns git ansible Actual results: =============== (overcloud) [cloud-user@ocp-deploy ~]$ source openrc311.sh (overcloud) [cloud-user@ocp-deploy ~]$ 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 Expected results: ================= I'm running the same command on OpenStack 13 Director, sourcing the same environments file: [stack@osp13-director scripts]$ source openrc311.sh (overcloud) [stack@osp13-director scripts]$ 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) [stack@osp13-director scripts]$ rpm -q python2-openstackclient python2-heatclient python2-octaviaclient python2-openstacksdk python2-urllib3 python2-chardet python2-openstackclient-3.14.3-5.el7ost.noarch python2-heatclient-1.14.1-1.el7ost.noarch python2-octaviaclient-1.4.1-1.el7ost.noarch python2-openstacksdk-0.11.4-1.el7ost.noarch python2-urllib3-1.21.1-1.2.el7ost.noarch package python2-chardet is not installed Additional info: ================ I am able to work around this with virtualenv, but because I need to use the ansible playbooks to provision the base stack to be used for the OpenShift install, I need to resolve it on the package level.
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