I just got started with cobbler. I set it up a RHEL6.2 desktop VM, added the EPEL repo, and installed cobbler and cobbler-web: cobbler-2.0.11-2.el6.noarch cobbler-web-2011-2.el6.noarch
I imported the RHEL6.2 install media into cobbler, then added a new system based on that profile. I PXE-booted another VM using the server and it seems to be working perfectly.
So.. where the heck is the kickstart file on the filesystem? Using the web interface, I can "view" it, but I'll be darned if I can find the thing on the server anywhere. AFAICT there's no way to edit the thing through the web UI, right?
I also tried creating a new kickstart file (again, in the web UI), by copying and pasting the kickstart file that was automatically generated. However, when I try that, I get a server error (lots of debug output not shown here) in /cobbler_web/ksfile/save.
Cheetah.Parse.ParseError: Error in the Python code which Cheetah generated for this template: [...]
(full error attached)
BTW, I tried creating just a simple kickstart file with a comment -- that works fine. I only get the error when I copy/paste the auto-generated kickstart.
On 2/28/12 12:39 PM, Robert Jacobson wrote:
I also tried creating a new kickstart file (again, in the web UI), by copying and pasting the kickstart file that was automatically generated. However, when I try that, I get a server error (lots of debug output not shown here) in /cobbler_web/ksfile/save.
Cheetah.Parse.ParseError: Error in the Python code which Cheetah generated for this template: [...]
narrowed it down to code like this in the kickstart. e.g. This generates the parser error:
IFNAME=$(foo|ls 3)
but using backquotes instead of $() seems to work:
IFNAME=`foo|ls 3`
Moderator is slow .. my original message with an attachment did not go through yet. Here's the original without the attachment:
On 2/28/12 12:39 PM, Robert Jacobson wrote:
I just got started with cobbler. I set it up a RHEL6.2 desktop VM, added the EPEL repo, and installed cobbler and cobbler-web: cobbler-2.0.11-2.el6.noarch cobbler-web-2011-2.el6.noarch
I imported the RHEL6.2 install media into cobbler, then added a new system based on that profile. I PXE-booted another VM using the server and it seems to be working perfectly.
So.. where the heck is the kickstart file on the filesystem? Using the web interface, I can "view" it, but I'll be darned if I can find the thing on the server anywhere. AFAICT there's no way to edit the thing through the web UI, right?
I also tried creating a new kickstart file (again, in the web UI), by copying and pasting the kickstart file that was automatically generated. However, when I try that, I get a server error (lots of debug output not shown here) in /cobbler_web/ksfile/save.
Cheetah.Parse.ParseError: Error in the Python code which Cheetah generated for this template: [...]
(full error attached)
BTW, I tried creating just a simple kickstart file with a comment -- that works fine. I only get the error when I copy/paste the auto-generated kickstart.
FYI, this list isn't moderated. There could be mailman/mailserver issues in play.
On Tuesday, February 28, 2012 at 2:10 PM, Robert Jacobson wrote:
Moderator is slow .. my original message with an attachment did not go through yet. Here's the original without the attachment:
On 2/28/12 12:39 PM, Robert Jacobson wrote:
I just got started with cobbler. I set it up a RHEL6.2 desktop VM, added the EPEL repo, and installed cobbler and cobbler-web: cobbler-2.0.11-2.el6.noarch cobbler-web-2011-2.el6.noarch
I imported the RHEL6.2 install media into cobbler, then added a new system based on that profile. I PXE-booted another VM using the server and it seems to be working perfectly.
So.. where the heck is the kickstart file on the filesystem? Using the web interface, I can "view" it, but I'll be darned if I can find the thing on the server anywhere. AFAICT there's no way to edit the thing through the web UI, right?
I also tried creating a new kickstart file (again, in the web UI), by copying and pasting the kickstart file that was automatically generated. However, when I try that, I get a server error (lots of debug output not shown here) in /cobbler_web/ksfile/save.
Cheetah.Parse.ParseError: Error in the Python code which Cheetah generated for this template: [...]
(full error attached)
BTW, I tried creating just a simple kickstart file with a comment -- that works fine. I only get the error when I copy/paste the auto-generated kickstart.
--
Robert Jacobson Robert.C.Jacobson@nasa.gov (mailto:Robert.C.Jacobson@nasa.gov) Flight Ops. Team Solar Dynamics Observatory (SDO) Bldg 14, E232 (301) 286-1591 _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org (mailto:cobbler@lists.fedorahosted.org) https://fedorahosted.org/mailman/listinfo/cobbler
----- Ursprüngliche Mail -----
So.. where the heck is the kickstart file on the filesystem? Using the web interface, I can "view" it, but I'll be darned if I can find the thing on the server anywhere. AFAICT there's no way to edit the thing through the web UI, right?
I'm not sure I understand the question right, but the kickstart file is generated ad-hoc on access through the HTTP server. You can view the output through
cobbler system getks --name=YourSystem
The templates lie in /var/lib/cobbler/kickstarts
Greetings André
On 2/29/2012 2:12 AM, André Gemünd wrote:
I'm not sure I understand the question right, but the kickstart file is generated ad-hoc on access through the HTTP server. You can view the output through
cobbler system getks --name=YourSystem
The templates lie in /var/lib/cobbler/kickstarts
Greetings André
Thanks.
I think my problem was -- I didn't realize before that the kickstart was being generated dynamically. I was looking for a file on the system "systemname" because that's what the browser displayed in the URL. But I now realize there is no such file.
What I should have been doing is looking at the profile and seeing what template it was based on (in this case it was "sample.ks"). "sample.ks" is full of snippets, so it doesn't really look like the final kickstart file presented to the client. i.e. The final kickstart file is dynamically generated and doesn't exist anywhere on the system.
Another "gotcha" I found, related to the parsing error I was seeing. It seems that the output of the snippets (generated by Cheetah?) can contain $() clauses, but the Cheetah parser will not accept $() as input without escaping the dollar($) with a backslash ().
I have a related question but I'm going to start a new thread to avoid mucking up this one.
On 29/02/12 12:28, Robert Jacobson wrote:
On 2/29/2012 2:12 AM, André Gemünd wrote:
I'm not sure I understand the question right, but the kickstart file is generated ad-hoc on access through the HTTP server. You can view the output through
cobbler system getks --name=YourSystem
The templates lie in /var/lib/cobbler/kickstarts
Greetings André
Thanks.
I think my problem was -- I didn't realize before that the kickstart was being generated dynamically. I was looking for a file on the system "systemname" because that's what the browser displayed in the URL. But I now realize there is no such file.
What I should have been doing is looking at the profile and seeing what template it was based on (in this case it was "sample.ks"). "sample.ks" is full of snippets, so it doesn't really look like the final kickstart file presented to the client. i.e. The final kickstart file is dynamically generated and doesn't exist anywhere on the system.
Another "gotcha" I found, related to the parsing error I was seeing. It seems that the output of the snippets (generated by Cheetah?) can contain $() clauses, but the Cheetah parser will not accept $() as input without escaping the dollar($) with a backslash ().
Indeed. The kickstart templates are evaluated by cheetah, which attempts to substitute variables for just about anything it sees beginning with a '$' symbol, unless it's marked as raw text, or part of a cheetah instruction. Some things definitely trip it up. The $() construct is one of them.
more info here: https://github.com/cobbler/cobbler/wiki/kickstart%20templating
The Cheetah user guide is also handy for language docs http://packages.python.org/Cheetah/users_guide/language.html
Stuart
On Wed, Feb 29, 2012 at 7:56 AM, Stuart Sears stuart@sjsears.com wrote:
On 29/02/12 12:28, Robert Jacobson wrote:
On 2/29/2012 2:12 AM, André Gemünd wrote:
Indeed. The kickstart templates are evaluated by cheetah, which attempts to substitute variables for just about anything it sees beginning with a '$' symbol, unless it's marked as raw text, or part of a cheetah instruction. Some things definitely trip it up. The $() construct is one of them.
more info here: https://github.com/cobbler/cobbler/wiki/kickstart%20templating
The Cheetah user guide is also handy for language docs http://packages.python.org/Cheetah/users_guide/language.html
If you're doing any kind of shell scripting, get to know and love #raw. It makes life a lot easier, especially if your shell scripts aren't using cobbler variables. Even then, there are ways to get around that:
#set foo = $getVar('foo','foo was not set by cobbler') export FOO=$foo #raw echo $FOO #end raw
This is really useful, for example if you have shell script generating other scripts in %post (ie. firstboot/rc.local stuff) so you don't have to do stuff like \$variable all the time. The keep_ssh_host_keys snippet that ships with cobbler shows a snippet that is completely wrapped by #raw/#end raw, since it doesn't require any access to cobbler variables to function.
/var/lib/cobbler/kickstarts and /var/lib/cobbler/snippets
The kickstart file you can view from the web interface (or by command line "cobbler system getks --name="...") is dynamically generated.
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes)
----- Robert Jacobson robert.c.jacobson@nasa.gov wrote:
I just got started with cobbler. I set it up a RHEL6.2 desktop VM, added the EPEL repo, and installed cobbler and cobbler-web: cobbler-2.0.11-2.el6.noarch cobbler-web-2011-2.el6.noarch
I imported the RHEL6.2 install media into cobbler, then added a new system based on that profile. I PXE-booted another VM using the server and it seems to be working perfectly.
So.. where the heck is the kickstart file on the filesystem? Using the web interface, I can "view" it, but I'll be darned if I can find the thing on the server anywhere. AFAICT there's no way to edit the thing through the web UI, right?
I also tried creating a new kickstart file (again, in the web UI), by copying and pasting the kickstart file that was automatically generated. However, when I try that, I get a server error (lots of debug output not shown here) in /cobbler_web/ksfile/save.
Cheetah.Parse.ParseError: Error in the Python code which Cheetah generated for this template: [...]
(full error attached)
BTW, I tried creating just a simple kickstart file with a comment -- that works fine. I only get the error when I copy/paste the auto-generated kickstart.
--
Robert JacobsonRobert.C.Jacobson@nasa.gov Lead System Admin Solar Dynamics Observatory (SDO) Bldg 14, E222 (301) 286-1591
cobbler@lists.fedorahosted.org