Re: [et-mgmt-tools] Cobbler v0.4.2-0 templating not working?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Foreman, Tim wrote:
Did templating change or break between 0.2.8-1 and 0.4.2-0?

I can't get the templating to work anymore.

My kickstart file has entries like this in it: INSTALL_ENV=TEMPLATE::env

When I add a system I use the --ksmeta option - like this:

cobbler system add --name=00:17:A4:3D:B4:5D --profile=base_test \
--ksmeta="env=mtc hostname=ibsqa-xen ip0=10.9.90.10 mask0=255.255.0.0
gw=10.10.0.3 ip1=10.10.90.10 mask1=255.255.0.0"

After I sync, the kickstart file the template line looks like this:
INSTALL_ENV=$env

And when I do a report --systems, the ksmeta data doesn't show up:
system          : 00:17:A4:3D:B4:5D
profile         : base_test
kernel options  : {}
ks metadata     : {}
pxe address :
Where is the ksmeta data going?
--
Timothy W. Foreman ~ Security Administrator ~ tforeman@xxxxxxxxx
(651) 365-4181     ~ Internet Broadcasting  ~ www.ibsys.com
--
The Onion: Have you decided what you want to be when you grow up?
Berkeley Breathed: Dad. The rest is frosting.

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

This is definitely bug. Apparently the "item.py" source code now splits ksmeta parameters on "," not on whitespace as it did in previous versions. I am changing 0.4.3 back to split on whitespace in accordance with the manpage.

If you use "," to seperate the items for now, you /should/ see them entered correctly, and on the upgrade, they should still be there. Cobbler is now storing internal datastructures as hashes and lists, rather than strings, and that's how this bug was introduced. The parsing function was fed in the wrong delimiter. The reason for changing the storage format is now much more data can be fed into the templating engine (especially if using the API and not the command line) where before it was hard to express strings that contained newlines and longer passages of text, like an SSH key. Basically it makes the YAML files in /var/lib/shadowmanager easier to edit and modify.

diff -r 78521aa0ef20 cobbler/item.py
--- a/cobbler/item.py   Tue Feb 27 14:46:54 2007 -0500
+++ b/cobbler/item.py   Wed Feb 28 16:16:14 2007 -0500
@@ -44,7 +44,7 @@ class Item(serializable.Serializable):
        The meta tags are used as input to the templating system
        to preprocess kickstart files
        """
-        (success, value) = utils.input_string_or_hash(options,",")
+        (success, value) = utils.input_string_or_hash(options,None)
        if not success:
            return False
        else:


--Michael


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux