Description of problem: Apparently #silent is not allowed, but cobbler crashes trying to tell me: Wed Dec 29 12:16:17 2010 - INFO | Exception occured: exceptions.TypeError Wed Dec 29 12:16:17 2010 - INFO | Exception value: not enough arguments for format string Wed Dec 29 12:16:17 2010 - INFO | Exception Info: File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 1759, in _dispatch return method_handle(*params) File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 920, in generate_kickstart return self.api.generate_kickstart(profile,system) File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 553, in generate_kickstart return self.kickgen.generate_kickstart_for_system(system) File "/usr/lib/python2.4/site-packages/cobbler/kickgen.py", line 198, in generate_kickstart_for_system return self.generate_kickstart(profile=p, system=s) File "/usr/lib/python2.4/site-packages/cobbler/kickgen.py", line 227, in generate_kickstart data = self.templar.render(raw_data, meta, None, obj) File "/usr/lib/python2.4/site-packages/cobbler/templar.py", line 134, in render t = Template(source=raw_data, errorCatcher="Echo", searchList=[search_table], compilerSettings={'useStackFrame':False}) File "DynamicallyCompiledCheetahTemplate.py", line 59, in __init__ File "/usr/lib/python2.4/site-packages/Cheetah/Template.py", line 1192, in __init__ self._compile(source, file, compilerSettings=compilerSettings) File "/usr/lib/python2.4/site-packages/Cheetah/Template.py", line 1480, in _compile keepRefToGeneratedCode=True) File "/usr/lib/python2.4/site-packages/cobbler/template_api.py", line 289, in compile return Cheetah.Template.Template.compile(*args, **kwargs) File "/usr/lib/python2.4/site-packages/Cheetah/Template.py", line 726, in compile compiler.compile() File "/usr/lib/python2.4/site-packages/Cheetah/Compiler.py", line 1678, in compile self._parser.parse() File "/usr/lib/python2.4/site-packages/Cheetah/Parser.py", line 1452, in parse self.eatDirective() File "/usr/lib/python2.4/site-packages/Cheetah/Parser.py", line 1593, in eatDirective handler(expr) File "/usr/lib/python2.4/site-packages/cobbler/template_api.py", line 51, in addSilent raise CX("Use of #silent is not allowed: %s"%expr) File "/usr/lib/python2.4/site-packages/cobbler/cexceptions.py", line 30, in __init__ self.value = value % args Version-Release number of selected component (if applicable): cobbler-2.0.10-1.el5 BTW - why is #silent not allowed?
First, is cobblerd actually crashing? It should be an exception that is being pushed out to the kickstart display layer as an error message that shows as an invalid kickstart file. Do you actually need to start cobblerd up again? Second, #silent isn't allowed because you can use it to execute arbitrary python code. If you have users accessing cobbler_web, editing templates, this can be a security risk. If you don't have that issue, you can set 'safe_templating: false' in your settings file and all those checks will be turned off and you can use all of the power of Cheetah. But, understand that this allows anyone editing templates or snippets the ability to run arbitrary python as root on your cobbler host.
Sorry, no, it isn't crashing. Just emitting the traceback. Thanks for the explanation. I was searching for a method to debugging a cheetah failure and #silent seemed promising. Is there a standard way of getting more debug info for a cheetah template failure?
We have ErrorCatcher echo[0] set by default to help in debugging. Unfortunately, debugging cheetah templates can be one of the more difficult portions of dealing with cobbler. If you want to post your issue to cobbler.org we can help you out. Also, stop by #cobbler on freenode. I generally hang around there during normal business hours EST and should be there again starting on the Third of January. Do remember, you can use #silent by setting safe templating to false. Just understand the security implications it presents. As for this bug, I'm going to close it as not a bug. Thanks. [0] - http://www.cheetahtemplate.org/docs/users_guide_html/#errorHandling.errorCatcher