Description of problem: When creating a kickstart via the wizard, if "Default Download Location" is selected the path of the distro tree is appended to the Kickstart --url in the kickstart file, rather than being translated into a /ks/cfg type cobbler path. The is also occurs if manually entering the distro-tree path into the url field in "Advanced Options" on the Kickstart Web UI. Version-Release number of selected component (if applicable): spacewalk-java-2.6.18-1 How reproducible: Create a new Kickstart profile via the wizard and select "Default Download Location." Also, enter the distro-tree into the url field on advanced options. Steps to Reproduce: 1. Create a KS via the wizard. 2. Select "Default Download Location" 3. View the kickstart file. Actual results: The distro-tree filesystem path is appended to the SW host. e.g: http://sw-server.domain.com/var/kickstart/distro-trees/kickstart_label Expected results: http://sw-server.domain.com/ks/dist/org/1/label Additional info: This bug was introduced by 03b5989d, as part of BZ 1356173 and RHBA-2016:2662-1. That fix incorrectly sets $media_path to the distro-tree filesystem path if the url field start with a "/". This incorrectly overrides KickstartFormatter.adjustUrlHost().
https://github.com/spacewalkproject/spacewalk/pull/527
Hi Laurence, if I'm correct, you described the same issue as mentioned in BZ 1388073. Fix has already been provided in nightly. Could you please confirm that we are talking about the same issue? Thank you
Hi Jiří, I think it's the same issue. However, 99b6a15a83b2b8d749c2743e08f6cd43bd3ded16 mentioned in that BZ doesn't seem to include the functionality mentioned in BZ 1356173. BZ 1356173 wanted any path that wasn't HTTP or FTP, and also wasn't the default download location, to be appended the the SW/proxy URI. My fix returned correct KS URL creation, but also included that logic. Could the SW team please discuss whether that is correct functionality?
I've spent some time trying to recreate this issue and compare to the PR # 527 to understand what is attempting to be fixed. I'll set up a scenario here to help explain the behavior I see in the current code and what I think is being asked for in this BZ (and addressed in PR # 527). Note that I've replaced my server host's FQDN with "myswsys.bogus.com". My spacewalk server has a rhel-6.8-server-x86_64 iso mounted at /var/distro-trees/rhel-6.8-server-x86_64 When I create a kickstart profile, the default download location is provided as /ks/dist/org/1/rhel-6.8-server-x86_64 When I look at the resulting kickstart file, it contains url --url http://myswsys.bogus.com/ks/dist/org/1/rhel-6.8-server-x86_64 If I go and edit the profile, and in advanced options, change the url field to be --url /my/new/download/path The resulting kickstart file contains url --url http://myswsys.bogus.com/my/new/download/path I think what is being asked, and what the PR # 527 changes, is that in the case when the url field is changed to the path on the filesystem where my distro-tree lives, and only that specific path, it should be converted to the default download location. So in advanced options, setting url field to --url /var/distro-trees/rhel-6.8-server-x86_64 would result in the resulting kickstart file containing url --url http://myswsys.bogus.com/ks/dist/org/1/rhel-6.8-server-x86_64 instead of url --url http://myswsys.bogus.com/var/distro-trees/rhel-6.8-server-x86_64 Is my assessment correct? Am I missing anything not described here (other than specified download locations starting with "http" or "ftp" are left untouched)?
Short answer: Yes, your assessment is correct. Long answer: Your assessment is correct and is how things worked prior to Spacewalk 2.6, but was broken by 03b5989d, as part of BZ 1356173 and RHBA-2016:2662-1. PR # 527 restores the correct functionality, but adds a condition where a filesystem path that isn't the default is appended verbatim. This behaviour was introduced by 03b5989d, but broke the core "default download location" translation in the process. For clarity, I'll add the following examples: url field: /var/distro-trees/rhel-6.8-server-x86_64 expected result: url --url http://myswsys.bogus.com/ks/dist/org/1/rhel-6.8-server-x86_64 url field: /some/random/path expected result: url --url http://myswsys.bogus.com/some/random/path url field: http://some.random.com/path expected result: url --url http://some.random.com/path url field: ftp://some.random.com/path expected result: url --url ftp://some.random.com/path
spacewalk.github: b28e0a472c9533ecd6b29352a80d156cadf01ade 01b7bea8d6695ea83b2667af246ee4c148ae2f00
Eric, I see neither of the commits (stated in Comment 6) in spacewalk.git. Can you, please, make sure correct hashes are stated?
Weird. Not sure what I did there. The two commits are: spacewalk.github 3302b7deea106c879708e39633996b2f6c39f4f3 a281e151586f745ec7ac301b99f55010cbebb2f8
Thank you.
Spacewalk 2.7 has been released. https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes27