Hi All,
I have a problem with cobbler using externally sourced kickstart files
that use template variables. It seems that pxegen.py refuses to use
the template service if the kickstart file is externally sourced.
Test:
--
1. configure test profile MyTestProfile with
--kickstart=http://myserver/svn/myrepo/mykickstart_template.ks which
contains template vars such as $local_mirror. Cobbler settings are
configured with: template_remote_kickstarts: 1
2. provide template key/values via ks_meta (ie --> local_mirror :
mylocalmirror.fqdn.com )
3. run cobbler sync
Result:
--
cobbler sync sees that kickstart is not local in pxegen.py and sets
kernel args to be ks=http://myserver/svn/myrepo/kickstart_template.ks
instead of hosting locally with
http://myserver/cblr/op/ks/profile/MyTestProfile.
Problem Location:
--
cobbler-2.0.11 file pxegen.py in PXEGen.build_kernel_options():
---- snippet -----
if system is not None and kickstart_path.startswith("/"):
kickstart_path = "http://%s/cblr/svc/op/ks/system/%s" %
(ipaddress, system.name)
elif kickstart_path.startswith("/"):
kickstart_path = "http://%s/cblr/svc/op/ks/profile/%s" %
(ipaddress, profile.name)
----- /snippet ----
Since my external kickstart_path (
http://myserver/<>/*.ks) does not
start with '/' cobbler does not change the ks= parameters to use the
template service and instructs my host to use
http://myserver/svn/myrepo/kickstart_template.ks. This of course
breaks because it is full of unresolved cheetah template variables.
I have worked around this with a little patch on these lines but I
wanted to see if this is a true bug. Ill submit a ticket and patch
if appropriate.
Thank You!
Matt