Discussion:
[Spacewalk-list] Kickstart Template Issues
Raymond Setchfield
2018-08-23 10:33:50 UTC
Permalink
Hi All,

I am experiencing some problems around the kickstart templates, and I am
attempting to following the guidelines, but it looks like I am still
running into problems.

I am receiving an error message of;
# 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.
#
#
# unexpected EOF while parsing (<string>, line 1)
# File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 142,
in render
# data_out = t.respond()
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
445, in respond
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
77, in __errorCatcher2
#

Is it possible someone could please have a look at the kickstart template I
am attempting to use, or could someone please share a template which they
are using which has variables etc. So at least I can take a look at
possible issues of where I am going wrong?

Many Thanks

Ray
Colin Coe
2018-08-24 00:34:08 UTC
Permalink
Historically, I see this when I comment out some shell script, like:

#if sometest

The fix to the above is to a space between the hash and 'if' like below:

# if sometest



I couldn't see anything obvious so I created a new kickstart profile on my
Satellite v5.8 system using your post script. There were no templating
errors.

Sorry, I know this isn't that helpful...

CC


On Thu, Aug 23, 2018 at 6:43 PM Raymond Setchfield <
Post by Raymond Setchfield
Hi All,
I am experiencing some problems around the kickstart templates, and I am
attempting to following the guidelines, but it looks like I am still
running into problems.
I am receiving an error message of;
# 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.
#
#
# unexpected EOF while parsing (<string>, line 1)
# File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 142,
in render
# data_out = t.respond()
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
445, in respond
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
77, in __errorCatcher2
#
Is it possible someone could please have a look at the kickstart template
I am attempting to use, or could someone please share a template which they
are using which has variables etc. So at least I can take a look at
possible issues of where I am going wrong?
Many Thanks
Ray
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
Colin Coe
2018-08-24 04:58:59 UTC
Permalink
Hmm, I just got this in one of my kickstart profiles when using
"$(something)". If I change it to "`something`" then the error goes away...
Post by Colin Coe
#if sometest
# if sometest
I couldn't see anything obvious so I created a new kickstart profile on my
Satellite v5.8 system using your post script. There were no templating
errors.
Sorry, I know this isn't that helpful...
CC
On Thu, Aug 23, 2018 at 6:43 PM Raymond Setchfield <
Post by Raymond Setchfield
Hi All,
I am experiencing some problems around the kickstart templates, and I am
attempting to following the guidelines, but it looks like I am still
running into problems.
I am receiving an error message of;
# 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.
#
#
# unexpected EOF while parsing (<string>, line 1)
# File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 142,
in render
# data_out = t.respond()
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
445, in respond
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
77, in __errorCatcher2
#
Is it possible someone could please have a look at the kickstart template
I am attempting to use, or could someone please share a template which they
are using which has variables etc. So at least I can take a look at
possible issues of where I am going wrong?
Many Thanks
Ray
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
Raymond Setchfield
2018-08-24 12:23:57 UTC
Permalink
Hi Colin

Thank you for your assistance on this. Yes, its all very fustrating,
especially when you can't figure out what is actually wrong :)

Are you suggesting that removing $() and replacing it with just ``?

Thanks

Ray
Post by Colin Coe
Hmm, I just got this in one of my kickstart profiles when using
"$(something)". If I change it to "`something`" then the error goes away...
Post by Colin Coe
#if sometest
# if sometest
I couldn't see anything obvious so I created a new kickstart profile on
my Satellite v5.8 system using your post script. There were no templating
errors.
Sorry, I know this isn't that helpful...
CC
On Thu, Aug 23, 2018 at 6:43 PM Raymond Setchfield <
Post by Raymond Setchfield
Hi All,
I am experiencing some problems around the kickstart templates, and I am
attempting to following the guidelines, but it looks like I am still
running into problems.
I am receiving an error message of;
# 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.
#
#
# unexpected EOF while parsing (<string>, line 1)
# File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line
142, in render
# data_out = t.respond()
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
445, in respond
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
77, in __errorCatcher2
#
Is it possible someone could please have a look at the kickstart
template I am attempting to use, or could someone please share a template
which they are using which has variables etc. So at least I can take a look
at possible issues of where I am going wrong?
Many Thanks
Ray
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
Colin Coe
2018-08-24 12:25:30 UTC
Permalink
Yes, try that

On Fri, Aug 24, 2018 at 8:24 PM Raymond Setchfield <
Post by Raymond Setchfield
Hi Colin
Thank you for your assistance on this. Yes, its all very fustrating,
especially when you can't figure out what is actually wrong :)
Are you suggesting that removing $() and replacing it with just ``?
Thanks
Ray
Post by Colin Coe
Hmm, I just got this in one of my kickstart profiles when using
"$(something)". If I change it to "`something`" then the error goes away...
Post by Colin Coe
#if sometest
# if sometest
I couldn't see anything obvious so I created a new kickstart profile on
my Satellite v5.8 system using your post script. There were no templating
errors.
Sorry, I know this isn't that helpful...
CC
On Thu, Aug 23, 2018 at 6:43 PM Raymond Setchfield <
Post by Raymond Setchfield
Hi All,
I am experiencing some problems around the kickstart templates, and I
am attempting to following the guidelines, but it looks like I am still
running into problems.
I am receiving an error message of;
# 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.
#
#
# unexpected EOF while parsing (<string>, line 1)
# File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line
142, in render
# data_out = t.respond()
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
445, in respond
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
77, in __errorCatcher2
#
Is it possible someone could please have a look at the kickstart
template I am attempting to use, or could someone please share a template
which they are using which has variables etc. So at least I can take a look
at possible issues of where I am going wrong?
Many Thanks
Ray
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
Colin Coe
2018-08-24 12:27:09 UTC
Permalink
Or, if you are not using snippets, wrap the code in

#raw
code here
#end raw
Post by Colin Coe
Yes, try that
On Fri, Aug 24, 2018 at 8:24 PM Raymond Setchfield <
Post by Raymond Setchfield
Hi Colin
Thank you for your assistance on this. Yes, its all very fustrating,
especially when you can't figure out what is actually wrong :)
Are you suggesting that removing $() and replacing it with just ``?
Thanks
Ray
Post by Colin Coe
Hmm, I just got this in one of my kickstart profiles when using
"$(something)". If I change it to "`something`" then the error goes away...
Post by Colin Coe
#if sometest
# if sometest
I couldn't see anything obvious so I created a new kickstart profile on
my Satellite v5.8 system using your post script. There were no templating
errors.
Sorry, I know this isn't that helpful...
CC
On Thu, Aug 23, 2018 at 6:43 PM Raymond Setchfield <
Post by Raymond Setchfield
Hi All,
I am experiencing some problems around the kickstart templates, and I
am attempting to following the guidelines, but it looks like I am still
running into problems.
I am receiving an error message of;
# 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.
#
#
# unexpected EOF while parsing (<string>, line 1)
# File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line
142, in render
# data_out = t.respond()
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
445, in respond
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
77, in __errorCatcher2
#
Is it possible someone could please have a look at the kickstart
template I am attempting to use, or could someone please share a template
which they are using which has variables etc. So at least I can take a look
at possible issues of where I am going wrong?
Many Thanks
Ray
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
Colin Coe
2018-08-24 12:28:52 UTC
Permalink
Or if you're are not using any of the templating functionality, un-check
the 'template' check box on the script page
https://sat.server.com/rhn/kickstart/KickstartScriptEdit.do
Post by Colin Coe
Or, if you are not using snippets, wrap the code in
#raw
code here
#end raw
Post by Colin Coe
Yes, try that
On Fri, Aug 24, 2018 at 8:24 PM Raymond Setchfield <
Post by Raymond Setchfield
Hi Colin
Thank you for your assistance on this. Yes, its all very fustrating,
especially when you can't figure out what is actually wrong :)
Are you suggesting that removing $() and replacing it with just ``?
Thanks
Ray
Post by Colin Coe
Hmm, I just got this in one of my kickstart profiles when using
"$(something)". If I change it to "`something`" then the error goes away...
Post by Colin Coe
#if sometest
# if sometest
I couldn't see anything obvious so I created a new kickstart profile
on my Satellite v5.8 system using your post script. There were no
templating errors.
Sorry, I know this isn't that helpful...
CC
On Thu, Aug 23, 2018 at 6:43 PM Raymond Setchfield <
Post by Raymond Setchfield
Hi All,
I am experiencing some problems around the kickstart templates, and I
am attempting to following the guidelines, but it looks like I am still
running into problems.
I am receiving an error message of;
# 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.
#
#
# unexpected EOF while parsing (<string>, line 1)
# File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line
142, in render
# data_out = t.respond()
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
445, in respond
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
77, in __errorCatcher2
#
Is it possible someone could please have a look at the kickstart
template I am attempting to use, or could someone please share a template
which they are using which has variables etc. So at least I can take a look
at possible issues of where I am going wrong?
Many Thanks
Ray
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
Raymond Setchfield
2018-08-24 12:37:06 UTC
Permalink
Thank you Colin

I'll review your comments, and give them a try. Again, thanks for you help
on this matter

Ray
Post by Colin Coe
Or if you're are not using any of the templating functionality, un-check
the 'template' check box on the script page
https://sat.server.com/rhn/kickstart/KickstartScriptEdit.do
Post by Colin Coe
Or, if you are not using snippets, wrap the code in
#raw
code here
#end raw
Post by Colin Coe
Yes, try that
On Fri, Aug 24, 2018 at 8:24 PM Raymond Setchfield <
Post by Raymond Setchfield
Hi Colin
Thank you for your assistance on this. Yes, its all very fustrating,
especially when you can't figure out what is actually wrong :)
Are you suggesting that removing $() and replacing it with just ``?
Thanks
Ray
Post by Colin Coe
Hmm, I just got this in one of my kickstart profiles when using
"$(something)". If I change it to "`something`" then the error goes away...
Post by Colin Coe
#if sometest
# if sometest
I couldn't see anything obvious so I created a new kickstart profile
on my Satellite v5.8 system using your post script. There were no
templating errors.
Sorry, I know this isn't that helpful...
CC
On Thu, Aug 23, 2018 at 6:43 PM Raymond Setchfield <
Post by Raymond Setchfield
Hi All,
I am experiencing some problems around the kickstart templates, and
I am attempting to following the guidelines, but it looks like I am still
running into problems.
I am receiving an error message of;
# 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.
#
#
# unexpected EOF while parsing (<string>, line 1)
# File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line
142, in render
# data_out = t.respond()
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
445, in respond
#
# File
"cheetah_DynamicallyCompiledCheetahTemplate_1535020182_58_55849.py", line
77, in __errorCatcher2
#
Is it possible someone could please have a look at the kickstart
template I am attempting to use, or could someone please share a template
which they are using which has variables etc. So at least I can take a look
at possible issues of where I am going wrong?
Many Thanks
Ray
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
_______________________________________________
Spacewalk-list mailing list
https://www.redhat.com/mailman/listinfo/spacewalk-list
Loading...