[cobbler] Finding snippet errors

Harry Hoffman hhoffman at ip-solutions.net
Fri Mar 22 12:07:35 UTC 2013


Can you share your snippet? Maybe we can help debug.

On 03/22/2013 08:05 AM, Robert Jacobson wrote:
> On 3/22/2013 7:30 AM, Harry Hoffman wrote:
>> Have you run "cobbler validateks" on the kickstart file that includes
>> the snippet?
> 
> Thanks, I didn't know about this -- However, for my particular example
> of a broken snippet, it doesn't help.  It just stops working with a
> non-helpful error message when it gets to the kickstart with the problem:
> 
>    Exception occured: <type 'exceptions.NameError'>
>    [etc]
> 
> 
>> Also, there's the ErrorCatcher class in cheetah (albeit not built into
>> cobbler) that can help with this.
> 
> Thanks again!   This will probably help for some things.  Still, it
> doesn't appear to help with my example broken snippet.  At least, not
> when I did this:
>     #errorCatcher Echo
>     #if $break_me == 1
>     #  no #end if...
> 
> I did notice that if  you have an undefined variable, it changes the
> behavior completely.  Without errorCatcher, the kickstart would just have:
>     $SNIPPET('snippet_with_error')
> but with errorCatcher, the kickstart is printed with the undefined
> variable in it.  Maybe this isn't a good thing, because there's no error
> message anywhere I can find.  i.e. all the errorCatcher does in this
> case is make the error silent!  At least when "$SNIPPET" is present I
> know there's an error in it :)
> 
> 
> 
> _______________________________________________
> cobbler mailing list
> cobbler at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/cobbler
> 


More information about the cobbler mailing list