On 09/18/2009 12:04 PM, Jeremy Rosengren wrote:
I just installed Cobbler 2.0 on a server that was running 1.6.6 and am seeing the following error:

[r...@srvr ~]# service cobblerd start
Starting cobbler daemon: Traceback (most recent call last):
  File "/usr/bin/cobblerd", line 76, in main
    api = cobbler_api.BootAPI(is_cobblerd=True)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 117, in __init__
    self.deserialize()
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 678, in deserialize
    return self._config.deserialize()
File "/usr/lib/python2.4/site-packages/cobbler/config.py", line 208, in deserialize
    serializer.deserialize(self._systems)
File "/usr/lib/python2.4/site-packages/cobbler/serializer.py", line 122, in deserialize
    rc = storage_module.deserialize(obj,topological)
File "/usr/lib/python2.4/site-packages/cobbler/modules/serializer_catalog.py", line 189, in deserialize
    obj.from_datastruct(datastruct)
File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line 153, in from_datastruct
    self.add(item)
File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line 234, in add
    ref.check_if_valid()
File "/usr/lib/python2.4/site-packages/cobbler/item_system.py", line 527, in check_if_valid
    raise CX("profile is required")
CX: 'profile is required'
                                                           [  OK  ]

I have a very simple configuration, as I mainly use cobbler to do non-kickstart PXE installs and therefore don't have any systems defined.

Thanks,

-- jeremy
------------------------------------------------------------------------

_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Hi Jeremy,

Looking over your configuration I see you do have one system record, stored as "win7.json". That's fine, you've encountered a Cobbler bug because of it though. Here's the contents of that file:

{"comment": "", "kickstart": "<<inherit>>", "name_servers_search": [], "ks_meta": {}, "kernel_options_post": {}, "image": "win7-x64_64", "redhat_management_key": "<<inherit>>", "virt_path": "<<inherit>>", "power_user": "", "kernel_options": {}, "name_servers": [], "mtime": 1243049642.635572, "template_files": {}, "gateway": "", "uid": "MTI0MzA0OTY0Mi42NDk0MTE3MjQuNTAxOTc", "power_type": "ipmitool", "virt_cpus": "<<inherit>>", "hostname": "", "mgmt_classes": [], "power_pass": "", "netboot_enabled": true, "profile": "", "virt_bridge": "<<inherit>>", "parent": "", "virt_type": "<<inherit>>", "interfaces": {}, "power_address": "", "virt_file_size": "<<inherit>>", "ctime": 1243049642.635572, "owners": ["admin"], "name": "win7", "virt_ram": "<<inherit>>", "power_id": "", "random_id": "FQ3L", "server": "<<inherit>>", "redhat_management_server": "<<inherit>>", "depth": 1}

It looks like 2.0 has a bug WRT image objects that we need to fix. Our code to validate systems looks like this:

    def check_if_valid(self):
        if self.name is None or self.name == "":
            raise CX("name is required")
        if self.profile is None or self.profile == "":
            raise CX("profile is required")

Basically the validation code assumes that the profile be set to something, but for a systems object, it can also be "parented" from an image. Either a profile or an image must be assigned, but not both. This has drifted from what it used to do.

Images have largely been used by OVirt.org at this point (which, IIRC, does not use system records), so I believe this warrants some wholesale testing of the image chain, all the way through to koan. They are clearly subject to a little bit of bitrot as I mostly concentrate on kickstart installations. We need to fix this as well as add-in a good series of tests to validate lesser-exercised sections of the app, no doubt.

If you want to get the rest of Cobbler working for testing purposes, you could temporarily move the win7.json file out the systems directory and restart cobblerd. Profiles should work fine, though it is clear we need to pound on images some more.

Thanks very much for the info!

--Michael
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to