Bug 1388073
| Summary: | unable to PXE provision: http://<fqdn>/rhn/kickstart/... gives 302 to https://... | |||
|---|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Jan Hutař <jhutar> | |
| Component: | Provisioning | Assignee: | Jan Dobes <jdobes> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Patrik Segedy <psegedy> | |
| Severity: | high | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 580 | CC: | arahaman, dyordano, jdobes, ktordeur, mkorbel, psegedy, tlestach | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | spacewalk-java-2.5.14-27 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1398248 (view as bug list) | Environment: | ||
| Last Closed: | 2017-06-21 12:08:39 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1340444, 1398248 | |||
|
Description
Jan Hutař
2016-10-24 11:31:43 UTC
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 |