On Wednesday, February 15, 2012 at 9:28 PM, Joshua J. Kugler wrote:

So, this problem:

Doing koan installs and allowing auto-register gives me a system with
"localhost" as the host name and a weird floating point number as the
system name in Cobbler, instead of what I expected, which was the value
I provided to koan as --virt-name.

Sure, there's a reason for that:

      if self.hostname != "" and self.hostname != "*AUTO*":
            hostname = self.hostname
            sysname = self.hostname
        else:
            hostname = socket.getfqdn()
            if hostname == "localhost.localdomain":
                if self.hostname == '*AUTO*':
                    hostname = ""
                    sysname = str(time.time())
                else:
                    raise InfoException("must specify --fqdn, could not discover")
            if sysname == "":
                sysname = hostname

Basically socket.getfqdn() just returned localhost, since it was unable to get a hostname at that time, resulting in the time of registration being used as the system name.   Using the IP wouldn't make sense because it might change.
 

lead to this attempted solution:

I defined a system using the profile I wanted, and then try to run koan
with --system=SYSTEM_NAME.

which lead to this problem:

System installs fine, but the kickstart meta data does not take affect;
in this case, the chef job that was run when I installed via --profile
was not run when I installed via a --system= that used the same
previously mentioned profile.

You might be using different kickstart templates if you assigned --kickstart to the system.   Hard to tell without seeing more.

I would find it unlikely that the metadata merger is broken as that's a pretty core piece of functionality.

which lead to this attempt:

koan --virt --profile=builder-el6-x86_64 --system=builder-el6-64-01\
--server=cobbler.example.com --virt-path=vg_group

which lead to this interesting bug:

- looking for Cobbler at http://cobbler.example.com:80/cobbler_api
- reading URL: http://172.29.1.101/cblr/svc/op/ks/system/builder-el6-
x86_64
Traceback (most recent call last):
<snip>
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: NOT FOUND

Why was it trying to pull the profile from the system section of the
API?

Can't you "override" the profile when you specify a system?

Kickstart metadata is hash merged such that ks meta values in the profile blend with the system, with the system replacing any keys defined in the system.   Though if you had a key set in the profile and not in the system, it would obviously remain. 

This is Cobbler/Koan 2.2.2 by the way.

Thanks for any help you can render!

j

--
Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
joshua@azariah.com - Jabber: pedahzur@gmail.com
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler