Bug 1460351 - oz fails direct boot because requests library automatically decodes gzip content
oz fails direct boot because requests library automatically decodes gzip content
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: oz (Show other bugs)
25
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Brendan Reilly
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-09 15:41 EDT by Dusty Mabe
Modified: 2017-11-20 21:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-11-20 21:10:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to backport gzip decompression fix (3.15 KB, patch)
2017-06-09 16:46 EDT, Brendan Reilly
no flags Details | Diff

  None (edit)
Description Dusty Mabe 2017-06-09 15:41:34 EDT
https://github.com/clalancette/oz/issues/237

We [recently](https://github.com/clalancette/oz/pull/231) switched to the requests library in oz. This works fine for the most part but the requests library has an interesting (and mostly useful) [feature](http://docs.python-requests.org/en/master/user/quickstart/#binary-response-content) where `The gzip and deflate transfer-encodings are automatically decoded for you.`

This does not play well with oz when trying to calculate if the file received was the right content length. We [write out the response from the requests library to a file](https://github.com/clalancette/oz/blob/23dafef3fd8e2d0b6426a52fc93f19e437a70c48/oz/ozutil.py#L835-L845) and then we [check](https://github.com/clalancette/oz/blob/23dafef3fd8e2d0b6426a52fc93f19e437a70c48/oz/Guest.py#L972) that the file size matches the content length from the http header. If it doesn't match, we move on to trying to boot from a `boot.iso`, which also [doesn't work](https://github.com/clalancette/oz/issues/236) for aarch64.


We need to get the patch from https://github.com/clalancette/oz/pull/238 into our version of oz.
Comment 1 Brendan Reilly 2017-06-09 16:46 EDT
Created attachment 1286532 [details]
Patch to backport gzip decompression fix

I've created and attached a patch for the oz dist git f25 branch using that upstream PR.
Comment 2 Dusty Mabe 2017-06-12 10:56:23 EDT
patch merged and build from koji:

https://koji.fedoraproject.org/koji/taskinfo?taskID=19982881
Comment 3 Fedora End Of Life 2017-11-16 13:49:32 EST
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 4 Chris Lalancette 2017-11-20 21:10:53 EST
Closing this out, since we got this in.

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