Description of problem: I'm unable to PXE provision because when anaconda tries to get http://<fqdn>/rhn/kickstart/..., Satellite gives 302 to https://... and that fails. When URIs are compared to 5.7.0, they are http://<fqdn>/ks/dist/.... Version-Release number of selected component (if applicable): Satellite-5.8-RHEL-6-20161017.n.0-Satellite-x86_64 How reproducible: always Steps to Reproduce: 1. Create KS profile 2. Check its rendered version System -> Kickstart -> Profile -> <profile> -> Kickstart File 3. E.g. check URL on "url --url http://..." Better test: Do a PXE provisioning Actual results: url --url http://satellite.example.com/rhn/kickstart/ks-rhel-x86_64-server-7-7.2 Expected results: On Satellite 5.7.0 where PXE works there is: url --url http://elisha.brq.redhat.com/ks/dist/ks-rhel-x86_64-server-7-7.2
This http config seems to be relevant and is same for both 5.7.0 and 5.8.0.n: # This rule handles incoming kickstart file requests from # machines actually performing a kickstart. This rule # processes the incoming URL and converts it into something # slightly more Struts friendly. RewriteRule ^/ks/cfg([-a-zA-Z0-9\._/\%\ ]*)$ /rhn/kickstart/DownloadFile.do?ksurl=$1 RewriteRule ^/download/(.*)$ /rhn/common/DownloadFile.do?url=$1 RewriteRule ^/rpc/api /rhn/rpc/api RewriteRule ^/ks/dist(.*)$ /rhn/common/DownloadFile.do?url=/ks/dist$1 RewriteRule ^(/ty/.*)$ /rhn/common/DownloadFile.do?url=$1
From 5.8.0.n: [root@satellite conf.d]# wget http://satellite.example.com/rhn/kickstart/ks-rhel-x86_64-server-7-7.2/LiveOS/squashfs.img --2016-10-24 07:34:17-- http://satellite.example.com/rhn/kickstart/ks-rhel-x86_64-server-7-7.2/LiveOS/squashfs.img Resolving satellite.example.com... 192.168.10.100 Connecting to satellite.example.com|192.168.10.100|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://satellite.example.com/rhn/kickstart/ks-rhel-x86_64-server-7-7.2/LiveOS/squashfs.img [following] --2016-10-24 07:34:17-- https://satellite.example.com/rhn/kickstart/ks-rhel-x86_64-server-7-7.2/LiveOS/squashfs.img Connecting to satellite.example.com|192.168.10.100|:443... connected. ERROR: cannot verify satellite.example.com’s certificate, issued by “/C=CZ/ST=C/L=B/O=A/OU=satellite.example.com/CN=satellite.example.com”: Unable to locally verify the issuer’s authority. To connect to satellite.example.com insecurely, use ‘--no-check-certificate’. [root@satellite conf.d]# wget http://satellite.example.com/ks/dist/ks-rhel-x86_64-server-7-7.2/LiveOS/squashfs.img --2016-10-24 07:34:27-- http://satellite.example.com/ks/dist/ks-rhel-x86_64-server-7-7.2/LiveOS/squashfs.img Resolving satellite.example.com... 192.168.10.100 Connecting to satellite.example.com|192.168.10.100|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 274071552 (261M) [application/octet-stream] Saving to: “squashfs.img.2” 100%[====================================================================================================================================================================================================>] 274,071,552 608M/s in 0.4s 2016-10-24 07:34:28 (608 MB/s) - “squashfs.img.2” saved [274071552/274071552]
Note this is also reproducible using `cobbler buildiso` ISO boot.
As a workaround I have added: # diff -u /etc/httpd/conf.d/zz-spacewalk-www.conf{.ORIG,} --- /etc/httpd/conf.d/zz-spacewalk-www.conf.ORIG 2016-10-25 03:39:45.511204405 -0400 +++ /etc/httpd/conf.d/zz-spacewalk-www.conf 2016-10-25 03:40:49.558204688 -0400 @@ -32,6 +32,7 @@ RewriteRule ^/ks/cfg([-a-zA-Z0-9\._/\%\ ]*)$ /rhn/kickstart/DownloadFile.do?ksurl=$1 RewriteRule ^/download/(.*)$ /rhn/common/DownloadFile.do?url=$1 RewriteRule ^/rpc/api /rhn/rpc/api +RewriteRule ^/rhn/kickstart(.*)$ /rhn/common/DownloadFile.do?url=/ks/dist$1 RewriteRule ^/ks/dist(.*)$ /rhn/common/DownloadFile.do?url=/ks/dist$1 RewriteRule ^(/ty/.*)$ /rhn/common/DownloadFile.do?url=$1
spacewalk master commits: 99b6a15a83b2b8d749c2743e08f6cd43bd3ded16 6f475886359ab5d0e608180db30a417660985825
Steps to verify: spacewalk-java-2.5.14-48.el6sat.noarch 1. Register system to Satellite 2. Create KS profile using synced kickstart tree 3. Check kickstart in System -> Kickstart -> Profile -> <profile> -> Kickstart File 4. There is correct url url --url http://<FQDN>/ks/dist/ks-rhel-x86_64-server-7-7.0 5. Provision registered system using this KS profile through WebUI System -> Provisioning -> Schedule -> Schedule Kickstart and Finish then run rhn_check on client 6. System is provisioned successfully Second approach using custom distribution spacewalk-java-2.5.14-46.el6sat.noarch 1. Register system 2. Mount ISO 3. Create KS distribution and KS profile 4. Check kickstart in System -> Kickstart -> Profile -> <profile> -> Kickstart File 5. There is correct url url --url http://<FQDN>/ks/dist/org/1/ks-custom-rhel7 6. Provision system through WebUI System -> Provisioning -> Schedule -> Schedule Kickstart and Finish then run rhn_check on client 7. System is provisioned successfully VERIFIED
Another workaround is to manually modify the kickstart url part : From Gui : Kickstart Details > Advance option > --url /rhn/kickstart/ks-rhel-x86_64-server-7-7.2 with --url /ks/dist/ks-rhel-x86_64-server-7-7.2 Thanks