Bug 1384661 - Capsules don't verify downloads, create 0 byte files when downloads fail
Summary: Capsules don't verify downloads, create 0 byte files when downloads fail
Keywords:
Status: CLOSED DUPLICATE of bug 1215588
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Capsule
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-13 19:16 UTC by David Davis
Modified: 2016-10-19 10:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-19 10:28:08 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description David Davis 2016-10-13 19:16:29 UTC
In https://bugzilla.redhat.com/show_bug.cgi?id=1317047, the download of the file from the Satellite server fails (503) but the Capsule goes ahead and creates a 0 byte file. There doesn't appear to be any error checking at all. Looking at the code confirms this:

https://git.io/vPVhw

Moreover, if I run that command with a bad file, I get a file on the filesystem with 0 bytes!

$ wget --timeout=10 --tries=3 --no-check-certificate -nv -c http://example.com/bad.file -O bad.file
$ ls -al bad.file
-rw-r--r--  1 jomama  wheel  0 Oct 13 15:13 bad.file


So not only does the Capsule not capture and report the error but it also creates a 0 byte file (as if the download succeeded).

That is BAD!!

Comment 3 Ivan Necas 2016-10-19 10:28:08 UTC
Seems like a duplicate of 1215588, we are tracking this issue upstream and looking into that at the moment.

*** This bug has been marked as a duplicate of bug 1215588 ***


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