[cobbler] Finding snippet errors

Harry Hoffman hhoffman at ip-solutions.net
Fri Mar 22 11:30:21 UTC 2013


Have you run "cobbler validateks" on the kickstart file that includes
the snippet?

Also, there's the ErrorCatcher class in cheetah (albeit not built into
cobbler) that can help with this.

Cheers,
Harry

On 03/22/2013 07:26 AM, Robert Jacobson wrote:
> On 3/22/2013 4:46 AM, James Cammarata wrote:
>>
>> Nothing gets logged in /var/logs/httpd/* nor
>> /var/log/cobbler/cobbler.log? You should see apache at least log the 500.
> 
> I hope you're using a configuration management tool on your
> snippets/kickstarts/etc.; IMO that's the best way to figure out what
> changed and broke things.  If you're not doing it already -- start now!
> 
> Related:  Would it be a big deal to add line breaks to the "*.json"
> files (profiles, systems, etc.)?  This would make it much easier for me
> to see changes to these.  Right now everything is all on one line and
> "diff" doesn't handle that very well.
> 
> <rantmode enabled=1>
> The lack of sensible error messages has kinda been a peeve of mine with
> cobbler-web when I make errors in snippets.  e.g. to break a snippet I
> added:
>     #if $break_me == 1
> to the top.  So now viewing the kickstart results in 'internal server
> error'.
> 
> While httpd/error_log and cobbler.log certainly log an error message,
> there's nothing really helpful in there to point to the error (am I
> missing something)?  I admit complete ignorance here -- Is this a
> Cheetah limitation?  Is there no way we can get an error like "variable
> 'break_me' undefined (line x in file 'snippet1')", or "no #end if for
> #if at line x" somewhere?
> 
> Obviously if I'm actively working on a snippet I know what's broken. 
> But if another admin changes something -- I have to use other tools like
> svn to figure out what changed.
> 
> Another thing I've found helpful is adding a
>     #stop
> At various points in the snippet to find the line or area that is broken.
> 
> Is there a better way? (I wish "don't makeany  mistakes in snippets" was
> an option :) )
> </rantmode>
> 


More information about the cobbler mailing list