[cobbler] Finding snippet errors (was: Internal Server Error)

Robert Jacobson Robert.C.Jacobson at nasa.gov
Fri Mar 22 11:26:11 UTC 2013


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>

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Robert Jacobson               Robert.C.Jacobson at nasa.gov
Lead System Admin       Solar Dynamics Observatory (SDO)
Bldg 14, E222                             (301) 286-1591



More information about the cobbler mailing list