Description of problem: The existence of an en-dash in the %post section of a kickstart causes it to be truncated when requested via proxy by cobbler URL. # printf %d\\n \'– 8211 ASCII character 8211 (en dash) Regardless of whether or not the line containing an en-dash is commented ("#") the kickstart still ends up being truncated. Using the cobbler ISO as an example, the kickstart line ("ks=") is hard coded like so: ks=http://<PROXY_FQDN>/cblr/svc/op/ks/profile/<COBBLER_PROFILE> When the kickstart is retrieved through a RHN Proxy the file ends up being truncated at the end: ... wget "http://<PROXY_FQDN>/cblr/svc/op/ks/profile/<COBBLER_PROFILE>" -O /root/cobbler.ks wget "http://<PROXY_FQDN>/cblr/svc/op/trig/mode/post/profile/<COBBLER_PROFILE>" -O /dev/null %en <--- truncated This will break provisioning as you could imagine. But when the kickstart is retrieved through Satellite the file is intact. Incidentally, it seems the number of characters truncated is equal to the number of en-dash(es). Version-Release number of selected component (if applicable): * Satellite v5.7 * RHN-Proxy v5.7 How reproducible: Always. Steps to Reproduce: 1. Install Satellite v5.7 2. Install RHN-Proxy v5.7 3. Register RHN-Proxy to Satellite 4. Create a new RHEL 6 kickstart (probably applies to any version but didn't test) 5. Add a new %post script (using "Shell" type) to the kickstart with an en-dash ("–") 6. Attempt to download the kickstart going through the proxy via wget/curl: wget "http://<PROXY_FQDN>/cblr/svc/op/ks/profile/<COBBLER_PROFILE>" 7. Observe that the kickstart is truncated Actual results: Kickstart file is truncated. Expected results: Kickstart is not truncated. Additional info: Retrieving the kickstart from both the Satellite or Proxy via the "Bare Metal Kickstart" URL works just fine: http://<FQDN>/ks/cfg/org/1/label/<KICKSTART_PROFILE>
Hello Neal, I've tried to reproduce this bug both on Satellite 5.7 and upstream and, actually, cannot do this. My steps: 1) Create a new KS profile for RHEL 6. 2) Add post script which contains en-dash(–) to kickstart file in my profile. 3) Register proxy (RHEL6) to Satellite server. 4) Register client via proxy. 5) Try to download kickstart file from client via proxy using wget: wget http://elisha.brq.redhat.com/cblr/svc/op/ks/profile/galtkickstart:1:RedHatSatTeamQA -O /root/kickstart.ks Result: I cannot download kickstart file w/o truncations. Packages on my proxy: spacewalk-proxy-broker-2.3.0-6.el6sat.noarch spacewalk-proxy-management-2.3.0-6.el6sat.noarch spacewalk-proxy-common-2.3.0-6.el6sat.noarch spacewalk-proxy-installer-2.3.0-7.el6sat.noarch Post script: #test en-dash – echo – echo "should be truncated start from here" printf %d\\n \'– echo "^^^ code of en-dash" #comment Can you, please, review my steps, what I'm doing wrong?
Hello Gennadi, I confirm the same packages are installed on my test setup: spacewalk-proxy-broker-2.3.0-6.el6sat.noarch spacewalk-proxy-management-2.3.0-6.el6sat.noarch spacewalk-proxy-common-2.3.0-6.el6sat.noarch spacewalk-proxy-installer-2.3.0-7.el6sat.noarch Your steps look fine, although I registered the proxy before creating the kickstart. Not sure if that would make much of a difference though. I just tried the test again with your %post script and it is truncated for me. At the end of the kickstart you downloaded does it look like this? """ # Start koan environment setup echo "export COBBLER_SERVER=192.168.122.117" > /etc/profile.d/cobbler.sh echo "setenv COBBLER_SERVER 192.168.122.117" > /etc/profile.d/cobbler.csh # End koan environment setup wget "http://192.168.122.117/cblr/svc/op/ks/profile/nkimtest:1:RedHat" -O /root/cobbler.ks wget "http://192.168.122.117/cblr/svc/op/trig/mode/post/profile/nkimtest:1:RedHat" -O /dev/null """ Notice there is no %end at the very end of the file.
Hello Neal, Thank you, now I see the problem, continue the investigation.
bug is fixed in upstream. spacewalk.git: c15e6e28a2655fcd74fefed853f3f8ce707ed390
Reproducer: 1) Create kickstart with following post scripts : #test en-dash – – – – – – – – – – – – – – – printf %d\\n \'– #test en-dash – – – – – – – – – – – – – – – 2) got link http://<proxy>/cblr/svc/op/ks/profile/<profile> and download or look at them: # Start koan environment setup echo "export COBBLER_SERVER=host-172-16-20-190.openstacklocal" > /etc/profile.d/cobbler.sh echo "setenv COBBLER_SERVER host-172-16-20-190.openstacklocal" > /etc/profile.d/cobbler.csh # End koan environment setup wget "http://host-172-16-20-190.openstacklocal/cblr/svc/op/ks/profile/rhel-server-6:1:RedHatSatTeamQA" -O /root/cobbler.ks wget "http://host-172-16-20-190.openstacklocal/cblr/svc/op/trig/mode/po original (file ends correct with "%end") : .... wget "http://host-172-16-20-190.openstacklocal/cblr/svc/op/trig/mode/post/profile/rhel-server-6:1:RedHatSatTeamQA" -O /dev/null %end Verified with spacewalk-java-2.5.14-84.el6sat.noarch