Description of problem: After updating python2-urllib3 to the latest version available in the OpenShift 3.11. repository (python2-urllib3-1.26.2-1.el7.noarch) the k8s_info module is failing: $ ansible -m k8s_info -a 'kind=namespaces' localhost /usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.2) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) localhost | FAILED! => { "changed": false, [...] Version-Release number of selected component (if applicable): - python2-urllib3-1.26.2-1.el7.noarch How reproducible: - Allways Steps to Reproduce: 1. update/install the OCP 3.11 to get the python2-urllib3-1.26.2-1.el7.noarch package from the 'rhel-7-server-ose-3.11-rpms' repository 2. run the k8s_info modul Actual results: - 'urllib3 (1.26.2) or chardet (3.0.4) doesn't match a supported version!' error message reported - module is failing Expected results: - module will proceed and give us results Workaround: - downgrade the python2-urllib3 package to 'python2-urllib3-1.24.3-1.el7.noarch'
The reported error is not related to openshift-ansible. Looks like python-requests>=2.20 would be needed. https://github.com/psf/requests/blob/v2.20.0/setup.py#L47 @jesusr, It looks like you recently tagged in the newer version of python-urllib3. https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1469298 Could you look into getting python-requests updated for rhaos-3.11-rhel-7?
I have done the following to address this bug: * reverted back to python2-urllib3 1.24.3 [1] which was the most recent 3.11 release before bumping to 1.26.2. * backported upstream patch to fix CVE-2020-26137 [2] which was why we updated to 1.26.2 in the first place * bumped the Epoch of python2-urllib3 1.24.3 to 1 to force it to downgrade the 1.26.2 on existing servers * created a bug [3] against python2-requests to support upgrading to newer urllib3. [1] brew build for 1.24.3-2 https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35834480 [2] https://bugzilla.redhat.com/show_bug.cgi?id=1883800 [3] https://bugzilla.redhat.com/show_bug.cgi?id=1944916
Verify failed. the latest package is python2-urllib3-1.26.2-2.el7.noarch. #subscription-manager register --username=XXX Password: The system has been registered with ID: 9e424092-b506-452a-ae02-535b1ed2c284 The registered system name is: ip-172-18-8-255.ec2.internal # subscription-manager repos --enable="rhel-7-server-ose-3.11-rpms" Repository 'rhel-7-server-ose-3.11-rpms' is enabled for this system. #yum update ... Replaced: python-urllib3.noarch 0:1.10.2-7.el7 Complete! # rpm -qa | grep urllib3 python2-urllib3-1.26.2-2.el7.noarch # ansible -m k8s_info -a 'kind=namespaces' localhost [WARNING]: Could not match supplied host pattern, ignoring: all [WARNING]: provided hosts list is empty, only localhost is available /usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.2) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) localhost | FAILED! => { "msg": "The module k8s_info was not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git pull --rebase' to correct this problem." }
With Bug 1944916 rebuilt, this bug should now be fixed in the next release.
Verify failed. cluster version: v3.11.439 with python2-urllib3-1.24.3-2.el7.noarch # subscription-manager register --username=xxx Registering to: subscription.rhsm.redhat.com:443/subscription Password: The system has been registered with ID: db369aea-1f15-480c-b9b9-9f2b65f7230e The registered system name is: ip-172-18-9-52.ec2.internal # subscription-manager repos --enable="rhel-7-server-ose-3.11-rpms" Repository 'rhel-7-server-ose-3.11-rpms' is enabled for this system. #yum update ... Installing: kernel x86_64 3.10.0-1160.31.1.el7 rhel-7-server-rpms 50 M python2-chardet noarch 3.0.4-7.el7ost aos 186 k replacing python-chardet.noarch 2.2.1-3.el7 python2-requests noarch 2.19.1-4.el7ost aos 123 k replacing python-requests.noarch 2.6.0-9.el7_8 python2-urllib3 noarch 1:1.24.3-2.el7 aos 170 k replacing python-urllib3.noarch 1.10.2-7.el7 ]# rpm -qa | grep urllib3 python2-urllib3-1.24.3-2.el7.noarch # ansible -m k8s_info -a 'kind=namespaces' localhost [WARNING]: Could not match supplied host pattern, ignoring: all [WARNING]: provided hosts list is empty, only localhost is available /usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.24.3) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) localhost | FAILED! => { "msg": "The module k8s_info was not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git pull --rebase' to correct this problem." }
This is fixed and should've been in the errata.
verified. No RequestsDependencyWarning and Failed as expected. cluster version: v3.11.465 with python2-urllib3-1.24.3-2.el7.noarch # rpm -qa | grep python2-requests python2-requests-2.19.1-5.el7.noarch # rpm -qa | grep urllib3 python2-urllib3-1.24.3-2.el7.noarch # ansible -m k8s_info -a 'kind=namespaces' localhost [WARNING]: Could not match supplied host pattern, ignoring: all [WARNING]: provided hosts list is empty, only localhost is available localhost | FAILED! => { "msg": "The module k8s_info was not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git pull --rebase' to correct this problem."
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.487 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-2021:2928