Bug 1507881 - Kickstart repo metadata download returns HTTP 200 status code for 404-type errors
Summary: Kickstart repo metadata download returns HTTP 200 status code for 404-type er...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.7
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-31 11:27 UTC by Ben Roberts
Modified: 2020-03-06 14:47 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-06 14:47:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Ben Roberts 2017-10-31 11:27:24 UTC
Description of problem:
I am trying to kickstart the installation of Fedora26 using Spacewalk for the repository content (production-fedora26-x86_64 base channel, cloned from fedora26-x86_64 which is sync'd from upstream). Joining a machine to Spacewalk during the kickstart using only the Fedora base repository fails because rhn-setup package is too old. To make a newer version available, I have tried to add the production-spacewalk27-client-fedora26-x86_64 child channel which contains fixed rhn-setup package.

Kickstart snippet:
url --url=https://sw/ks/dist/org/1/production-fedora26-x86_64/
repo --name=spacewalk27-client --baseurl=https://sw/ks/dist/child/production-spacewalk27-client-fedora26-x86_64/production-fedora26-x86_64

Running this build fails with the somewhat unhelpful error "mandatory spokes not completed: installation source, software selection". Root cause of this, looking in /tmp/ is checksum failure while downloading "comps.xml" for production-spacewalk27-client-fedora26-x86_64 repository.

repomd.xml lists "comps.xml" with a checksum that matches the contents of /var/satellite/rhn/comps/spacewalk27-client-fedora26-x86_64/comps-spacewalk-client-fedora26.xml.

dnf is comparing this against the checksum of what it gets when it requests "comps.xml", which despite having a 200 error code, contains a html error page and not the actual comps data.

Requesting this URL in a web browser responds with:
"File Download Failed
The file you requested could not be downloaded, likely due to one of the following reasons:

The url has expired.
The url has been modified.
The Spacewalk server does not have read permissions on the specified file.
Please revisit the page you received this url from to receive a new one."

apache logs show this request and error code also:
"GET /ks/dist/child/production-spacewalk27-client-fedora26-x86_64/production-fedora26-x86_64/repodata/comps.xml HTTP/1.1" 200 4520


Version-Release number of selected component (if applicable):
2.7

How reproducible:
Always


Steps to Reproduce:
1. Use "spacecmd softwarechannel_clonetree" to clone base channel containing spacewalk27-client as a child channel
2. Attempt to download all the files listed in repomd.xml for this channel via the kickstart URL (e.g. https://sw/ks/dist/child/production-spacewalk27-client-fedora26-x86_64/production-fedora26-x86_64/repodata/comps.xml)
3.

Actual results:
HTTP status code is 200


Expected results:
HTTP status code should be 4xx to indicate a failure.


Additional info:
Probably related to BZ 1493484 (spacecmd softwarechannel_clonetree does not clone comps)

Comment 1 Michael Mráka 2020-03-06 14:47:51 UTC
Spacewalk 2.8 (and older) has already reached it's End Of Life.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before end of life. If you would still like
to see this bug fixed and are able to reproduce it against current version
of Spacewalk 2.9, you are encouraged change the 'version' and re-open it.


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