Bug 1944916

Summary: python2-requests prevents updating python-urllib3
Product: OpenShift Container Platform Reporter: Jesus M. Rodriguez <jesusr>
Component: ReleaseAssignee: Jesus M. Rodriguez <jesusr>
Status: CLOSED ERRATA QA Contact: Gaoyun Pei <gpei>
Severity: high Docs Contact:
Priority: high    
Version: 3.11.0CC: aos-bugs, jokerman, yselkowi
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-30 15:46:04 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:
Bug Depends On:    
Bug Blocks: 1920894, 1924613    
Attachments:
Description Flags
Patch for python2-requests to support 1.24 none

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