Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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: Foreman Proxy
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
high
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:
Embargoed:


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.