Bug 1944916 - python2-requests prevents updating python-urllib3
Summary: python2-requests prevents updating python-urllib3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Release
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.11.z
Assignee: Jesus M. Rodriguez
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks: 1920894 1924613
TreeView+ depends on / blocked
 
Reported: 2021-03-30 22:44 UTC by Jesus M. Rodriguez
Modified: 2024-12-20 19:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-30 15:46:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch for python2-requests to support 1.24 (742 bytes, patch)
2021-03-30 22:48 UTC, Jesus M. Rodriguez
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1883800 1 None None None 2024-03-25 16:37:10 UTC
Red Hat Bugzilla 1920894 1 unspecified CLOSED python2-urllib3: update 1.24.3 -> 1.26.2 for OCP breaks cloud-init ("Unable to get API token: None/latest/api/token") 2024-06-14 00:02:58 UTC
Red Hat Bugzilla 1924613 1 high CLOSED python2-urllib3 breaking some ansible modules 2024-12-20 19:36:03 UTC
Red Hat Product Errata RHSA-2021:2517 0 None None None 2021-06-30 15:47:27 UTC

Description Jesus M. Rodriguez 2021-03-30 22:44:54 UTC
Unable to update python2-urllib3 to 1.24.3 or newer to address CVEs because python2-requests 2.19.1-4 prints out warning:

# ansible localhost -m ping
/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)

Comment 1 Jesus M. Rodriguez 2021-03-30 22:48:55 UTC
Created attachment 1767867 [details]
Patch for python2-requests to support 1.24

Here is a patch that needs to be included in the python-requests.spec file for 3.11.

Then in the spec file you need to add the following:

# Work with python-urllib3
# https://bugzilla.redhat.com/show_bug.cgi?id=1944916
Patch5:         bug1944916-update-urllib3-minor.patch

Comment 2 Jesus M. Rodriguez 2021-03-31 15:58:41 UTC
cc @tvignaud Thierry not sure if you have any thoughts on this since you were the last person to build it for RHOS. 

@lmeyer another option is to create a 3.11 buildroot for this package so that we can build them in 3.11 and carry it there.

Comment 3 Luke Meyer 2021-04-08 23:43:08 UTC
adding a rhaos-3.11-rhel-7 branch in distgit should work, unless it has all sorts of BuildRequires not already in our buildroot (in which case i suppose we could add them)

Comment 8 Jesus M. Rodriguez 2021-06-15 18:37:11 UTC
bash-4.2# rpm -qa | grep urllib3
python2-urllib3-1.24.3-2.el7.noarch
bash-4.2# rpm -qa | grep python2-requests
python2-requests-oauthlib-0.8.0-5.el7.noarch
python2-requests-2.19.1-5.el7.noarch
bash-4.2# ansible -m k8s_info -a 'kind=namespaces'  localhost
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."
}

Using the build of python2-requests in this bug will fix the warning that was exhibited.

Comment 9 Jesus M. Rodriguez 2021-06-15 19:07:22 UTC
Built python2-requests 2.19.1-5 https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=37503580

Comment 12 Gaoyun Pei 2021-06-23 12:09:10 UTC
Verify this bug with python2-requests-2.19.1-5.el7.noarch, which was attached in advisory https://errata.devel.redhat.com/advisory/77771.

Per https://bugzilla.redhat.com/show_bug.cgi?id=1944916#c8, 
# rpm -qa | grep urllib3
python2-urllib3-1.24.3-2.el7.noarch

# rpm -qa | grep python2-requests
python2-requests-2.19.1-5.el7.noarch

# ansible localhost -m ping
localhost | SUCCESS => {
    "changed": false, 
    "ping": "pong"
}

Comment 14 errata-xmlrpc 2021-06-30 15:46:04 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 (Important: OpenShift Container Platform 3.11.462 bug fix and security 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/RHSA-2021:2517


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