Hej!
I go the same problem upgrading from 1.6.6.
I had a distro with with files that dont exist any more. Old cobbler
just complained and started.
I removed the distro file and now it start.
/Jonas
Michael DeHaan wrote:
On 09/18/2009 12:34 PM, Michael DeHaan wrote:
> 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:
>>
>> [root@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
>> cobbler(a)lists.fedorahosted.org
>>
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
> cobbler(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/cobbler
>
I've pushed some changes into git that allow the image objects to be
loaded, and also fixed a CLI problem related to image adding/editing.
This should allow the basics around images to be workable.
We still need to go through the image based workflow and make sure
(end-to-end, through koan) everything is happy, though this should fix
your problem.
Based on this, we won't push 2.0.0 stock through to stable, we'll
likely do that with a 2.0.1.
Note -- I have a series of meetings and so forth next week, so my
ability to get images happy and working may be limited, though further
testing is welcome -- and I'll be right back on it as soon as
possible. If other folks want to help this along, be my guest. The
latest changes are all pushed to git.
Thanks!
--Michael
------------------------------------------------------------------------
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
--
-------------------------------------------
Systemexpert jonas.hagberg(a)it.uu.se
Jonas Hagberg tel 018 - 471 1026
UPPMAX fax: 018 - 51 19 25
Uppsala universitet
Box 337, Lägerhyddsv 2E, Hus 4, room 4111
751 05 Uppsala