I was running cobbler 1.6.1 on CentOS 5.2, and things worked fine. Today I updated to CentOS 5.3 and cobbler 1.6.2 (cobbler-1.6.2-1.el5 from the EPEL repo). Now the cobblerd failed to start with the following output:
# service cobblerd start Starting cobbler daemon: while constructing a mapping found unacceptable key (dict objects are unhashable) in "", line 9, column 5: {}: ~ ^ File "/usr/bin/cobblerd", line 87, in main api = cobbler_api.BootAPI(log_settings=log_settings, is_cobblerd=True)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 110, in __init__ self.deserialize()
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 621, in deserialize return self._config.deserialize()
File "/usr/lib/python2.4/site-packages/cobbler/config.py", line 212, in deserialize serializer.deserialize(self._repos)
File "/usr/lib/python2.4/site-packages/cobbler/serializer.py", line 133, in deserialize rc = storage_module.deserialize(obj,topological)
File "/usr/lib/python2.4/site-packages/cobbler/modules/serializer_catalog.py", line 141, in deserialize datastruct = deserialize_raw(obj.collection_type())
File "/usr/lib/python2.4/site-packages/cobbler/modules/serializer_catalog.py", line 113, in deserialize_raw datastruct = yaml.load(ydata)
File "/usr/lib/python2.4/site-packages/yaml/__init__.py", line 58, in load return loader.get_single_data()
File "/usr/lib/python2.4/site-packages/yaml/constructor.py", line 44, in get_single_data return self.construct_document(node)
File "/usr/lib/python2.4/site-packages/yaml/constructor.py", line 53, in construct_document for dummy in generator:
File "/usr/lib/python2.4/site-packages/yaml/constructor.py", line 403, in construct_yaml_map value = self.construct_mapping(node)
File "/usr/lib/python2.4/site-packages/yaml/constructor.py", line 213, in construct_mapping return BaseConstructor.construct_mapping(self, node, deep=deep)
File "/usr/lib/python2.4/site-packages/yaml/constructor.py", line 137, in construct_mapping "found unacceptable key (%s)" % exc, key_node.start_mark)
[ OK ] # service cobblerd status cobblerd dead but subsys locked
Looking at the files in /var/lib/cobbler/config/repos.d/ I noticed that some files have suspicious-looking 'environment' data, e.g.
environment: "'~'}": ~ '{''{}'':': ~
- or -
environment: {}: ~
After fixing the latter to read
environment: {}
cobblerd starts up fine. I don't know if this problematic 'environment' option was present with cobbler 1.6.1 (probably it was). I added all the repos with command-line tool, but since then I've used cobbler web interface to modify the settings; could it have broke things?
Additionally, modifying settings with the cobbler 1.6.2 web interface seems to be broken: clicking e.g. a profile opens a page for adding a new profile (should open the clicked one for editing). The link looks fine:
http:///cobbler/web/?mode=profile_edit&name=Fedora-10-CTS-i386
but it opens a blank "Adding a profile" page.
_________________________________________________________________ Tutustu videoiden avulla Windows Live tuotteisiin. http://www.microsoft.fi/live
Sami Hartikainen wrote:
I was running cobbler 1.6.1 on CentOS 5.2, and things worked fine. Today I updated to CentOS 5.3 and cobbler 1.6.2 (cobbler-1.6.2-1.el5 from the EPEL repo). Now the cobblerd failed to start with the following output:
This has been brought up on the mailing list a few times and is a result of the previous serializer configuration and the upgrade process involved with it, so one you fix it, it will go away for good. Your fix about changing it to:
environment: {}
Is exactly the correct fix.
Additionally, modifying settings with the cobbler 1.6.2 web interface seems to be broken: clicking e.g. a profile opens a page for adding a new profile (should open the clicked one for editing). The link looks fine:
http:///cobbler/web/?mode=profile_edit&name=Fedora-10-CTS-i386
Does the profile show up in /var/lib/cobbler/config/profile.d/ ?
This may be an issue with the profile being deleted already but still showing up in the list -- or some other caching issue. I need to look into these a bit closer.
Steps to recreate this problem would be helpful.
--Michael
The following profiles are present:
# ls -1 /var/lib/cobbler/config/profiles.d/ Fedora-10-CTS-i386 Fedora-10-CTS-i386-interactive.json Fedora-10-CTS-i386-testing rescue-Fedora-10-i386
The 'interactive' one was upgraded to .json file when doing 'cobbler profile edit ...' with cobbler 1.6.2; the others are unmodified as created by cobbler 1.6.1.
Now trying to edit this 'interactive' profile through the webui works, while the others just offer to add a new profile.
Looks like this can be fixed by doing a simple edit like
# cobbler profile edit --virt-cpus=1 --name=Fedora-10-CTS-i386-testing upgrading yaml file to json: /var/lib/cobbler/config/profiles.d/Fedora-10-CTS-i386-testing
The same symptoms also occur with Distros and Repos, and doing something similar fixes them as well.
--sami
----------------------------------------
Additionally, modifying settings with the cobbler 1.6.2 web interface seems to be broken: clicking e.g. a profile opens a page for adding a new profile (should open the clicked one for editing). The link looks fine:
http:///cobbler/web/?mode=profile_edit&name=Fedora-10-CTS-i386
Does the profile show up in /var/lib/cobbler/config/profile.d/ ?
This may be an issue with the profile being deleted already but still showing up in the list -- or some other caching issue. I need to look into these a bit closer.
Steps to recreate this problem would be helpful.
--Michael
_________________________________________________________________ Tutustu videoiden avulla Windows Live tuotteisiin. http://www.microsoft.fi/live
# cobbler profile edit --virt-cpus=1 --name=Fedora-10-CTS-i386-testing upgrading yaml file to json: /var/lib/cobbler/config/profiles.d/Fedora-10-CTS-i386-testing
Your RPM upgrade somehow didn't manage to run "cobbler reserialize" (perhaps used with --noscripts, perhaps something else happened), so do this now, and all files will use the json versions.
This command is normally used in upgrades, so I recommend backing up /var/lib/cobbler/config first.
--Michael
Okay, thanks. Seems to work ok now.
I think what happened was that my initial problem with one of the repo config files having garbage in the 'environment' option prevented also the 'cobbler reserialize' from running.
--sami
----------------------------------------
Date: Fri, 24 Apr 2009 08:15:33 -0400 From: mdehaan@redhat.com To: cobbler@lists.fedorahosted.org Subject: Re: updated to 1.6.2: broken webui-config
# cobbler profile edit --virt-cpus=1 --name=Fedora-10-CTS-i386-testing upgrading yaml file to json: /var/lib/cobbler/config/profiles.d/Fedora-10-CTS-i386-testing
Your RPM upgrade somehow didn't manage to run "cobbler reserialize" (perhaps used with --noscripts, perhaps something else happened), so do this now, and all files will use the json versions.
This command is normally used in upgrades, so I recommend backing up /var/lib/cobbler/config first.
--Michael
cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
_________________________________________________________________ Windows puhelimella saat enemmän vastinetta rahoillesi. http://www.windowsmobile.fi
cobbler@lists.fedorahosted.org