On Thu, May 6, 2010 at 10:26 AM, Benjamin Riggs <riggs(a)umn.edu> wrote:
On 5/6/2010 3:20 AM, Tom Brown wrote:
> Hi
>
> We are looking at a migration from standalone cobbler and going to
> spacewalk. Currently spacewalk just requires 'cobbler' but on a fresh
> install you get 2.0.3 and i have actually upgraded this to 2.0.4 to
> see if the error is still there and it is.
>
> Basically a number of our snippets dont render out they are just left
> with $SNIPPET('name') in the rendered out ks and yet these work fine
> on 1.6.5 - Is there any difference in how cheetah renders stuff out in
> the versions?
>
> An example of a snippet that does not work is
>
> #set root_password = $getVar("role"," ")
> #if $root_password == "XXX"
> # Set the root pwd to be for XXX
> rootpw --iscrypted XXXXXXXXXXXXXXXXXXXXXX
> #elif $root_password == "XXX"
> # Set the root pwd to be for XXX
> rootpw --iscrypted XXXXXXXXXXXXXXXXXXXXXX
> #else
> # Set the XXX root pwd
> rootpw --iscrypted XXXXXXXXXXXXXXXXXXXXXX
> #end if
>
> now i can make this one work with #raw's however we have some rather
> more complicated ones that might be more tricky to fix like that.
>
> any clues on why they fail?
>
> thanks
> _______________________________________________
> cobbler mailing list
> cobbler(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/cobbler
>
The problem you're encountering is due to a '$' appearing in your
password hashes. With version 2.0.3, snippets are now included via
Cheetah, whereas before, cobbler itself was replacing them with the
appropriate file. The net result is that you need to use #raw & #end
raw tags around your password hashes (ssh keys, etc). Unfortunately,
there is a bug in cobbler whereby, when these snippets fail to parse,
the original 'snippet' line is all that remains in the parsed kickstart,
rather than any sort of error message being included, which is what
happens for parsing errors in the main kickstart file.
See these threads for previous discussion of this issue:
https://fedorahosted.org/pipermail/cobbler-devel/2010-March/001506.html
https://fedorahosted.org/pipermail/cobbler-devel/2010-February/001488.html
I just created a ticket for the issue:
https://fedorahosted.org/cobbler/ticket/587
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
What was the reason for the change?
Not to beat a dead horse, but I'm in the process of upgrading my
cobbler 1.6.2 install to 2.0.x myself and I'm running into this exact
same problem. The implications are more serious on my end though as
this particular change breaks rendering of recursive snippets (which I
use quite a bit in my setup).
To give a simple example of an instance where this is breaking, I have
one snippet called modular_template that calls in four more snippets:
config_prep0, config_prep, openntpd_config, and
increase_resource_limits.
To answer the obvious question: yes, I did take those snippets out of
the modular_template snippet and place them directly in my kickstart,
but that only broke my config_prep snippets; and no, #raw tags did not
help the situation either.
--
Dominic LoBue