Description of problem: According to an email thread in spacewalk-list http://www.mail-archive.com/spacewalk-list@redhat.com/msg04590.html there might be necessery to create upgrade scripts for kickstart snippet migration for sat5.3 -> sat6.0. Version-Release number of selected component (if applicable): satellite 530 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: ... Looks like something borked in the api spacewalk liases with on upgrade (or version) as my kickstarts had snippets in them that had not be expanded when viewing the kickstarts. note that 'some' kickstart snippets did expand... it was a bit weird ^^ Calling cobbler sync from the spacewalk UI and tailing the cobbler log files didnt' show much, if anything, happening. Reverting cobbler to 1.6.6 then rerunning cobbler sync showed the api being used to sync up cobbler with the spacewalk database. ... I have the same problem. I replaced the $variable of my snippet by \$variable and its work. But I have others litle problem to solve yet.
What I checked: - installed satellite 5.3 with cobbler 1.6 - created kickstart profile with number of $variables - checked visualy files in /var/lib/rhn/kickstarts/snippets/ - successfully kickstarted client system then - upgraded to satellite 5.4 with cobbler 2.0 - visualy checked files in /var/lib/rhn/kickstarts/snippets/ (no change since sat 5.3) - successfully kickstarted client system No changes / upgrade script was needed.
Ok, I have reproduced it. 1. Create kickstart profile in Systems > Kickstart 2. Create snippet in Systems > Kickstart > Kickstart Snippets For example: export test=`uname -a` echo $test 3. Go to your kickstart profile into System Details > Partitioning Add $SNIPPET(<PATH_TO_YOUR_SNIPPET>) at the end 4. Check Kickstart File - In 5.3 version (cobbler 1.6) there is content of snippet expanded - In 5.4 version (cobbler 2.0) there in just $SNIPPET(...) line Also note that when you add snippet line ($SNIPPET) into Scripts > add new scripts it will not be expanded in Kickstart File in neither version of cobbler. I can also confirm, that escaping $ is helping. That's the reason why some snippets got expanded (those without $) and some not.
Confirmed that upgrade from 5.3 to 5.4 (from 1.6 cobbler to 2.0) generated kickstart file WITHOUT expanded snippet. Propose solution: - Add escaping of $ into upgrade.
It's about content of snippet not the snippet references in ksfile. Snippets are not stored in db but directly in files on disk. So it's not a schema-upgrade stuff. IMHO we have 2 options here: a) create upgrade script and put it into rhn-upgrade (+ instruction how/when to use) b) as we re-package cobbler rpm for satellite we can put the script to post-upgrade section.
I would also suggest to either put note on snippet creation page that if user want's to use $, he should escape it with \ or check the form submit operation that in fact creates a snippet file to escape $s. As this bug is only about upgrading, maybe create new bug for creation.
Instead of escaping all $ signs we can put '#raw' in the beginning of snippet.
There's already a cobbler ticket about this: https://fedorahosted.org/cobbler/ticket/587
Fixed in satellite git by commit ae811596334f9ac198bab582bcc7b9d8f2c852fc 591549 - avoid $variable expansion in snippets
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332 RHEA-2010:0803 - RHN Tools enhancement update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333 RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334 RHEA-2010:0800 - RHN Satellite Server 5.4.0 https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335 Docs are available: http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html Regards, Clifford