Bug 1485010 - media_path incorrect set on Cobbler profile creation
Summary: media_path incorrect set on Cobbler profile creation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI
Version: 560
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Jiří Dostál
QA Contact: Ales Dujicek
URL:
Whiteboard:
Depends On:
Blocks: sat58-errata
TreeView+ depends on / blocked
 
Reported: 2017-08-24 20:17 UTC by Shannon Hughes
Modified: 2021-06-10 12:52 UTC (History)
5 users (show)

Fixed In Version: spacewalk-java-2.0.2-116-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-13 07:57:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1388073 0 unspecified CLOSED unable to PXE provision: http://<fqdn>/rhn/kickstart/... gives 302 to https://... 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1477728 0 urgent CLOSED Upgrade to Sat 5.8 caused url change in kickstarts, have to edit and republish by hand to correct url. 2023-09-15 00:03:18 UTC
Red Hat Product Errata RHBA-2017:3444 0 normal SHIPPED_LIVE Red Hat Satellite 5.6 bug fix update 2017-12-12 18:54:02 UTC

Internal Links: 1388073 1477728

Description Shannon Hughes 2017-08-24 20:17:03 UTC
Description of problem:

This looks to be a regression from Erratum RHBA-2016:1866-1

When creating a kickstart profile in 5.6 the media_path get incorrectly set to the /rhn/kickstart/ path which results in the request getting sent directly to tomcat resulting in a 404. the media path should most likely be the /ks/dist path so the url is properly handed by the rewrite rule in apache: 

RewriteRule ^/ks/dist(.*)$ /rhn/common/DownloadFile.do?url=/ks/dist$1

code commit where problem introduced in commit b3e3e1609102d4486a38d905a4a9064f8731d5d0

+++ b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerProfileCommand.java
@@ -106,6 +106,9 @@ public abstract class CobblerProfileCommand extends CobblerCommand {
 
         Map meta = profile.getKsMeta();
         meta.put("org", this.ksData.getOrg().getId());
+        if (this.ksData.getUrl().startsWith("/")) {
+            meta.put("media_path", this.ksData.getUrl());
+        }
         profile.setKsMeta(meta);

Comment 14 errata-xmlrpc 2017-12-13 07:57:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:3444


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