Project

Profile

Help

Network maintenance. Planio will be observing two scheduled maintenance windows this Tuesday, March 2 and Wednesday, March 3 from 02:00 UTC until 06:00 UTC each in order to perform maintenance on access routers in our primary datacenter. Your account might observe short downtimes during these periods up to several minutes at a time.

Issue #1211

Importing from forge is broken with python-requests 2.7.0-1.fc22

Added by bmbouter over 5 years ago. Updated almost 2 years ago.

Status:
CLOSED - NOTABUG
Priority:
High
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Fedora 22
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Pulp carries an older version of python-requests than is available on F22 in base repositories. Pulp carries python-requests-2.4.3-1 but @System on F22 provides python-requests-2.7.0-1.fc22

When python-requests fetches the metadata from forge it is failing to decompress the gzip response from the server which causes json to fail since its processing gzip data instead of plaintext. Here is the TCP stream information as captured from wireshark during a request with python-requests-2.7.0.

GET /modules.json?q=torssh HTTP/1.1
Host: forge.puppetlabs.com
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.7.0 CPython/2.7.10 Linux/4.1.5-200.fc22.x86_64

HTTP/1.1 200 OK
Server: nginx
Date: Fri, 21 Aug 2015 20:07:13 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200 OK
Cache-Control: private, must-revalidate, max-age=0
X-Node: forge-app02-prod
X-Revision: ff29653
X-Content-Type-Options: nosniff
Vary: Accept-Encoding
Content-Encoding: gzip

b9
.......U..d.A..0.E.Bf...=.q...R....6....ww........o.P.LH ...srP.5;.{5.......r..|.8r>...h.s..d
...)..H.K+..E.BL|..j....c.Q.a.&..B. ...:.
.
uu.jX....@j..E...4X..n.mLR...[.'.......[>~)....
0

Downgrading python-requests to Pulp's 2.4.3-1 causes the response to be decoded as normal plaintext.

History

#1 Updated by bmbouter over 5 years ago

I've confirmed that the downgraded library is also requesting using gzip as the content-type and the data sent over the wire is gzip encoded. This means the newer version is failing to decompress the data, and not that the data is being sent with plaintext in the newer python-requests.

python-requests is supposed to automatically decompress gzip encoded data according to its docs.

This is probably also broken in F21 since that same 2.7.0-1 is published there. See this page for info for which versions are on which distributions.

#2 Updated by bmbouter over 5 years ago

  • Status changed from NEW to CLOSED - NOTABUG
  • Triaged changed from No to Yes

This was due to a broken python-urllib3 package after I upgraded to f22. I've gotten the correct packages installed on gzip decompression is working again.

#3 Updated by bmbouter almost 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF