On Mon, Feb 21, 2011 at 01:18:38PM +0100, Mirko Leanza wrote:
>Just creating cobbler-profiles and having them point at your old
>kickstart-files should work.
>Yet, be aware that you should at least set
> #raw
>as first line there and
> #end raw
>as last line.
>This should prevent cobbler from interpreting things inside of your
>files.
>For all new generated profiles without legacy its probably useful
>to write code only once as snippets and then use it for many profiles.
I read about #raw directive, but how I must change the "install/ cdrom"
directive that are present in my old kickstart file?
You want to use
url --url=$tree
instead, and have the
#raw
starting below that line so cobbler can substiture $tree with the variable
from the cobbler-profile.
Alternatively you could hardcode a url, but thats not the cobbler-way.
An example cobbbler template is here:
/var/lib/cobbler/kickstarts/sample.ks
Christian
I try to use the default kickstart Sample, but when from the Web
Interface/Profile I click on "View Kickstart"
Obtain an error:
" # *** ERROR ***
#
# There is a templating error preventing this file from rendering correctly.
#
# This is most likely not due to a bug in Cobbler and is something you can
fix.
#
# Look at the message below to see what things are causing problems.
#
# (1) Does the template file reference a $variable that is not defined?
# (2) is there a formatting error in a Cheetah directive?
# (3) Should dollar signs ($) be escaped that are not being escaped?
#
# Try fixing the problem and then investigate to see if this message goes
# away or changes.
#
#
# SNIPPET() takes exactly 2 arguments (3 given)
# File "/usr/lib/python2.6/site-packages/cobbler/templar.py", line 141, in
render
# data_out = t.respond()
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1298390571_14_93336.py", line
256, in respond
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1298390571_14_93336.py", line
81, in __errorCatcher3
#
# File "<string>", line 1, in <module>
# "
While if I use my own legacy kickstart (after changing --url and setting
#raw/#end raw) I obtain from the Web interface a 500 internal server error
Going in apache log return the following:
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] mod_wsgi (pid=940):
Exception occurred processing WSGI script
'/var/www/cobbler/svc/services.wsgi'., referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] Traceback (most
recent call last):, referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] File
"/var/www/cobbler/svc/services.wsgi", line 78, in application, referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] content = func(
**form ), referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] File
"/usr/lib/python2.6/site-packages/cobbler/services.py", line 91, in ks,
referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] data =
self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC),
referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] File
"/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__, referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] return
self.__send(self.__name, args), referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] File
"/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request, referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31]
verbose=self.__verbose, referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] File
"/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request, referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] return
self._parse_response(h.getfile(), sock), referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] File
"/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response, referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] return
u.close(), referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] File
"/usr/lib64/python2.6/xmlrpclib.py", line 838, in close, referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] raise
Fault(**self._stack[0]), referer:
http://192.168.60.2/cobbler_web/profile/list
[Tue Feb 22 16:14:10 2011] [error] [client 172.16.17.31] Fault: <Fault 1:
"<type 'exceptions.UnicodeDecodeError'>:'ascii' codec can't
decode byte 0xe8
in position 1456: ordinal not in range(128)">, referer:
http://192.168.60.2/cobbler_web/profile/list
So at the moment the unique result that I achieved... is use Cobbler like a
simple PXE Server...
Please help!
What's the problem?
My cobbler version is 2.0.10-1 installed on CentoOS 6, I think I'm losing
some thing...
Mirko