When rending a kickstart file if the url for the distro is set as a full URL: http://hostname/path/to/distro we leave it alone and don't try to change it to work through a proxy. If it's set to just a path: /path/to/distro then when rendered, we render the correct hostname. Somewhere along the way this was broken and we're generating whole URLS in KickstartableTree.getDefaultDownloadLoacation() so they end up like this: htt://hostname/path/to/distro which means they never get rendered to: htt://@@http_server@@/path/to/distro and so cobbler never substitues in the proxy server if one is used.
In fact here's a nice piece of code: StringBuilder buf = new StringBuilder(); if (host != null && host.length() > 0) { buf.append("http://").append(host); } if (!defaultLocation.startsWith("/")) { buf.append("/"); } so make a string with 'http://hostname' and if it doesn't start with '/' (which it never will), then append '/'. How does that make any sense....
In summary, unless we fix this, provisioning through proxy won't work properly if the client can't communicate with the satellite as well..
df5eb48
http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=df5eb48a72d6b02e485f55ca029be435d22f55b8
VERIFIED on 6/12 build of both Satellite and Proxy.
Test Plan (for clarification purposes): 1. Create a kickstart profile on an RHN Satellite >= 530 2. Activate an RHN Proxy against this Satellite 3. Register a machine to this Proxy 4. Kickstart this machine (registered through the proxy) with the profile you created earlier (on the Satellite) 5. Before the machine reboots, kill the reboot process with a 'shutdown -c' 6. View the URL for the kickstart file supplied for this kickstart in /etc/grub.conf or /etc/lilo.conf (it should be in the ks=<url> kernel parameter) 7. Verify that the kickstart file contains a 'url --url' directive that reflects the FQDN of the Proxy and NOT of the Satellite 8. If this is true, then reboot the box and verify that the kickstart succeeds
Re-verified in staged (Satellite-5.3.0-RHEL5-re20090724.0) Followed the steps in comment #6 The sat was: http://sun-x4200-01.rhts.bos.redhat.com The proxy was: http://fjs-0-20.rhndev.redhat.com Notice that /etc/grub.conf and /root/cobbler.ks reference the proxy and not the sat. moving to RELEASE_PENDING THE GRUB FILE # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00 # initrd /initrd-version.img #boot=/dev/hda default=0 timeout=5 serial --unit=0 --speed=38400 terminal --timeout=5 serial console title kick1250186477 root (hd0,0) kernel /vmlinuz ro root=/dev/VolGroup00/LogVol00 acpi=noirq console=ttyS0,38400n8 acpi=noirq ks=http://fjs-0-20.rhndev.redhat.com/cblr/svc/op/ks/system/rlx-3-24:3 ksdevice=link kssendmac lang= text initrd /initrd.img title Red Hat Enterprise Linux Server (2.6.18-128.el5xen) root (hd0,0) kernel /xen.gz-2.6.18-128.el5 com1=38400n8 acpi=noirq module /vmlinuz-2.6.18-128.el5xen ro root=/dev/VolGroup00/LogVol00 acpi=noirq console=ttyS0,38400n8 acpi=noirq module /initrd-2.6.18-128.el5xen.img THE KICKSTART FILE # Kickstart config file generated by RHN Satellite Config Management # Profile Label : ks_to_RHEL5 # Date Created : 2009-08-13 13:57:03.0 install text network --bootproto dhcp url --url http://fjs-0-20.rhndev.redhat.com/ty/PYFuP7mY lang en_US keyboard us <cut off>
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-1434.html