[cobbler] Lost kickstart inheritance from profile?
Gary Algier
gaa at ulticom.com
Thu Sep 4 22:08:03 UTC 2014
Hi Nish:
On 09/04/14 11:21, Nishanth Aravamudan wrote:
> Hi Gary,
>
> On 04.09.2014 [10:45:19 -0400], Gary Algier wrote:
>> Hello,
>>
>> Am I missing something or did the <<inherit>> ability disappear from
>> the kickstart parameter on a system definition?
>>
>> Our old cobbler server is running 2.0.9. When I define a system,
>> the kickstart parameter is a text box that defaults to <<inherit>>.
>> I then get what I want because I choose the profile which defines a
>> kickstart parameter (along with other interdependent parameters).
>>
>> Our new server is running 2.6.5. When I define a system, the
>> kickstart parameter is a pull-down that defaults to default.ks. It
>> does not matter what profile I choose, it will not override this
>> default. I need to pick the kickstart parameter on the system
>> definition. If this is the case, why is there a kickstart parameter
>> on the profile? It is always ignored.
>>
>> Is there a way to get back the inheritance from the profile?
>
> This is a bug introduced upstream:
> https://lists.fedorahosted.org/pipermail/cobbler-devel/2014-August/002815.html
>
> -Nish
>
I looked at the reference posting but it must be talking about a different
release of Cobbler/Cobbler-Web as it does not look anything like what I have.
However, I figured out how to fix it, but how do I submit the fix to somebody?
The fix for Cobbler 2.6.5 and Cobbler-Web 2.6.5 is:
--- /usr/lib/python2.6/site-packages/cobbler/original.remote.py 2014-09-04
17:34:20.000000000 -0400
+++ /usr/lib/python2.6/site-packages/cobbler/remote.py 2014-09-04
17:57:47.000000000 -0400
@@ -817,6 +817,9 @@
@param str path kickstart template file path
"""
+ if path.find("<<inherit>>") != -1:
+ return
+
if path.find("..") != -1 or not path.startswith("/"):
utils.die(self.logger, "Invalid kickstart template file location
%s" % path)
--- /usr/share/cobbler/web/cobbler_web/original.views.py 2014-09-04
17:59:59.000000000 -0400
+++ /usr/share/cobbler/web/cobbler_web/views.py 2014-09-04 16:52:36.000000000
-0400
@@ -1080,7 +1080,7 @@
elif what == "system":
__tweak_field(fields, "profile", "choices",
__names_from_dicts(remote.get_profiles()))
__tweak_field(fields, "image", "choices",
__names_from_dicts(remote.get_images(),optional=True))
- __tweak_field(fields, "kickstart", "choices",
remote.get_kickstart_templates())
+ __tweak_field(fields, "kickstart", "choices", ['<<inherit>>'] +
remote.get_kickstart_templates())
elif what == "mgmtclass":
__tweak_field(fields, "packages", "choices",
__names_from_dicts(remote.get_packages()))
__tweak_field(fields, "files", "choices",
__names_from_dicts(remote.get_files()))
--
Gary Algier, WB2FWZ gaa at ulticom.com +1 856 787 2758
Ulticom Inc., 1020 Briggs Rd, Mt. Laurel, NJ 08054 Fax:+1 856 866 2033
Nielsen's First Law of Computer Manuals:
People don't read documentation voluntarily.
More information about the cobbler
mailing list