Bug 1329382
Summary: | urllib3 PoolManager does not pool connections based on SSL configuration | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Jeremy Cline <jcline> | ||||||||
Component: | python-urllib3 | Assignee: | Charalampos Stratakis <cstratak> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Jan Houska <jhouska> | ||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 6.9 | CC: | bkearney, bnater, cstratak, jalberts, pviktori, rbarlow, tlavigne | ||||||||
Target Milestone: | rc | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | 1.10.2-2 | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | |||||||||||
: | 1394919 (view as bug list) | Environment: | |||||||||
Last Closed: | 2017-03-21 09:24:01 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: | 1356060, 1359256, 1394919 | ||||||||||
Attachments: |
|
Description
Jeremy Cline
2016-04-21 19:02:14 UTC
Created attachment 1149548 [details] Proposed patch I've gone ahead and back-ported the patch from https://github.com/shazow/urllib3/pull/830. The attached patch should apply cleanly to the 1.10.2 tag and all tests pass. Created attachment 1199099 [details]
Test script that demonstrates the bug.
Updated reproducer provided by Jeremy Cline.
Verified: OlD: python-urllib3-1.10.2-1.el6.noarch :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ BEGIN ] :: Running python script :: actually running 'python test_urllib3.py 2>&1 | tee output.log' /tmp/tmpiWO_yP /tmp/tmp_NFSej Traceback (most recent call last): File "test_urllib3.py", line 81, in <module> request = pool_manager.request('GET', url) File "/usr/lib/python2.6/site-packages/urllib3/request.py", line 68, in request **urlopen_kw) File "/usr/lib/python2.6/site-packages/urllib3/request.py", line 81, in request_encode_url return self.urlopen(method, url, **urlopen_kw) File "/usr/lib/python2.6/site-packages/urllib3/poolmanager.py", line 161, in urlopen response = conn.urlopen(method, u.request_uri, **kw) File "/usr/lib/python2.6/site-packages/urllib3/connectionpool.py", line 574, in urlopen raise SSLError(e) urllib3.exceptions.SSLError: [Errno 185090050] _ssl.c:330: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib :: [ FAIL ] :: Running python script (Expected 0, got 1) :: [ FAIL ] :: File 'output.log' should not contain 'Traceback' :: [ FAIL ] :: File 'output.log' should not contain 'request = pool_manager.request('GET', url)' :: [ FAIL ] :: File 'output.log' should not contain 'urllib3.exceptions.SSLError:' :: [ FAIL ] :: File 'output.log' should not contain 'Errno 185090050' :: [ FAIL ] :: File 'output.log' should not contain 'error:0B084002:x509' :: [ PASS ] :: File 'output.log' should not contain '[Errno 2] No such file or directory' :: [ FAIL ] :: File 'output.log' should contain 'No exception raised! Seems things are working.' '3857dab8-c768-4815-b986-684d9f38d7cc' Test result: FAIL NEW: python-urllib3-1.10.2-3.el6.noarch :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ BEGIN ] :: Running python script :: actually running 'python test_urllib3.py 2>&1 | tee output.log' /tmp/tmpNpwvqz /tmp/tmpXrXLbM No exception raised! Seems things are working. :: [ PASS ] :: Running python script (Expected 0, got 0) :: [ PASS ] :: File 'output.log' should not contain 'Traceback' :: [ PASS ] :: File 'output.log' should not contain 'request = pool_manager.request('GET', url)' :: [ PASS ] :: File 'output.log' should not contain 'urllib3.exceptions.SSLError:' :: [ PASS ] :: File 'output.log' should not contain 'Errno 185090050' :: [ PASS ] :: File 'output.log' should not contain 'error:0B084002:x509' :: [ PASS ] :: File 'output.log' should not contain '[Errno 2] No such file or directory' :: [ PASS ] :: File 'output.log' should contain 'No exception raised! Seems things are working.' '28781b7e-7398-4621-9aa2-ffbeb3278a07' Test result: PASS 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, 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://rhn.redhat.com/errata/RHBA-2017-0596.html |