On Fri, Mar 22, 2013 at 6:26 AM, Robert Jacobson <span dir="ltr">&lt;<a href="mailto:Robert.C.Jacobson@nasa.gov" target="_blank">Robert.C.Jacobson@nasa.gov</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 3/22/2013 4:46 AM, James Cammarata wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Nothing gets logged in /var/logs/httpd/* nor /var/log/cobbler/cobbler.log? You should see apache at least log the 500.<br>
</blockquote>
<br>
I hope you&#39;re using a configuration management tool on your snippets/kickstarts/etc.; IMO that&#39;s the best way to figure out what changed and broke things.  If you&#39;re not doing it already -- start now!<br>
<br>
Related:  Would it be a big deal to add line breaks to the &quot;*.json&quot; 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 &quot;diff&quot; doesn&#39;t handle that very well.<br>
</blockquote><div><br></div><div>This may have been answered later in the thread, but an option called &quot;pretty_print_json&quot; was added in the last few months as well, and will be in 2.4.0. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
&lt;rantmode enabled=1&gt;<br>
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:<br>
    #if $break_me == 1<br>
to the top.  So now viewing the kickstart results in &#39;internal server error&#39;.<br>
<br>
While httpd/error_log and cobbler.log certainly log an error message, there&#39;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 &quot;variable &#39;break_me&#39; undefined (line x in file &#39;snippet1&#39;)&quot;, or &quot;no #end if for #if at line x&quot; somewhere?<br>

<br>
Obviously if I&#39;m actively working on a snippet I know what&#39;s broken.  But if another admin changes something -- I have to use other tools like svn to figure out what changed.<br>
<br>
Another thing I&#39;ve found helpful is adding a<br>
    #stop<br>
At various points in the snippet to find the line or area that is broken.<br>
<br>
Is there a better way? (I wish &quot;don&#39;t makeany  mistakes in snippets&quot; was an option :) )<br>
&lt;/rantmode&gt;</blockquote><div><br></div><div>It was with me too, for sure. I did address that recently, and the patch will also be included in 2.4.0. Basically it logs all cheetah parsing errors to cobbler.log so if it hits an unrendered variable or other non-critical errors it will now report that. Unfortunately cheetah doesn&#39;t make debugging some issues easy, which is one of the reasons I wouldn&#39;t mind moving away from it in the future. </div>
<div><br></div><div>That being said, the webui most definitely should not just fail like that, so if you can send me the snippet that caused that (or if it&#39;s just any cheetah parsing error) I&#39;ll work on a patch to correct that too.</div>
</div>