It probably failed to load the new way and that is not the true error but an 
error in failing the old way (pre catalog serializer, there was 1 file per 
object type, not .d directories).  Debug further?

We should prob disable the fallback behavior.

-- Michael

On Jan 18, 2012, at 3:37 AM, Lassi Pölönen <[email protected]> wrote:

> On 2012-01-17 19:42, Lassi Pölönen wrote:
>> Hi,
>> 
>> I'm running cobbler cobbler-2.2.1-1.el6.noarch from epel-testing on RHEL
>> 6. I decided to try Cobbler's "files" as a replacement for snippets to
>> create static files on post-install. Didn't start too well:
>> 
>> first I tried:
>> 
>> cobbler file add --name=nagios-nrpe-xinetd-conf
>> --path=/var/lib/cobbler/files/xinetd.d/nrpe
>> 
>> 
>> and got no output. At this point cobbler file report didn't list
>> anything... also /var/lib/cobbler/config/files.d/ is empty.
>> 
>> cobbler's log wrote these lines:
>> 
>> -----
>> Tue Jan 17 17:32:00 2012 - DEBUG | get_item; ['file',
>> 'nagios-nrpe-xinetd-conf']
>> Tue Jan 17 17:32:00 2012 - DEBUG | done with get_item; ['file',
>> 'nagios-nrpe-xinetd-conf']
>> Tue Jan 17 17:32:00 2012 - INFO | Exception occured: <class
>> 'cobbler.cexceptions.CX'>
>> Tue Jan 17 17:32:00 2012 - INFO | Exception value: 'internal error,
>> unknown file name nagios-nrpe-xinetd-conf'
>> Tue Jan 17 17:32:00 2012 - INFO | Exception Info:
>>  File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 866,
>> in xapi_object_edit
>>    handle = self.get_item_handle(object_type, object_name)
>>   File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 659,
>> in get_item_handle
>>    raise CX("internal error, unknown %s name %s" % (what,name))
>> 
>> Tue Jan 17 17:32:00 2012 - INFO | REMOTE new_item(file); user(<DIRECT>)
>> Tue Jan 17 17:32:00 2012 - DEBUG | REMOTE CLI Authorized; user(?)
>> Tue Jan 17 17:32:00 2012 - INFO | REMOTE modify_item(file);
>> user(<DIRECT>);
>> object_id(___NEW___file::tcYwwbmv31Tw+dByGLJCTtp+JyYqoLWcLQ==);
>> attribute(in_place)
>> Tue Jan 17 17:32:00 2012 - DEBUG | REMOTE CLI Authorized; user(?)
>> Tue Jan 17 17:32:00 2012 - INFO | REMOTE modify_item(file);
>> user(<DIRECT>);
>> object_id(___NEW___file::tcYwwbmv31Tw+dByGLJCTtp+JyYqoLWcLQ==);
>> attribute(name)
>> Tue Jan 17 17:32:00 2012 - DEBUG | REMOTE CLI Authorized; user(?)
>> Tue Jan 17 17:32:00 2012 - INFO | REMOTE modify_item(file);
>> user(<DIRECT>);
>> object_id(___NEW___file::tcYwwbmv31Tw+dByGLJCTtp+JyYqoLWcLQ==);
>> attribute(path)
>> Tue Jan 17 17:32:00 2012 - DEBUG | REMOTE CLI Authorized; user(?)
>> Tue Jan 17 17:32:00 2012 - INFO | REMOTE save_item(file);
>> user(<DIRECT>);
>> object_id(___NEW___file::tcYwwbmv31Tw+dByGLJCTtp+JyYqoLWcLQ==)
>> Tue Jan 17 17:32:00 2012 - DEBUG | REMOTE CLI Authorized; user(?)
>> Tue Jan 17 17:32:00 2012 - INFO | add_item(file);
>> ['nagios-nrpe-xinetd-conf']
>> Tue Jan 17 17:32:00 2012 - DEBUG | get_items; ['file']
>> Tue Jan 17 17:32:00 2012 - DEBUG | done with get_items; ['file']
>> ----
>> 
>> 
>> 
>> I tried cobbler sync, didn't help either. Then I though I'll restart
>> cobblerd and try again, but it doesn't start anymore. Instead I get:
>> 
>> 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.6/site-packages/cobbler/api.py", line 130, in
>> __init__
>>    self.deserialize()
>>  File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 795, in
>> deserialize
>>    return self._config.deserialize()
>>  File "/usr/lib/python2.6/site-packages/cobbler/config.py", line 266,
>> in deserialize
>>    raise CX("serializer: error loading collection %s. Check
>> /etc/cobbler/modules.conf" % item.collection_type())
>> CX: 'serializer: error loading collection file. Check
>> /etc/cobbler/modules.conf'
>> 
>> 
>> the only changes I've made to modules.conf are authentication and tftpd
>> and the config has been working for quite a while. SElinux is disabled.
>> I've tried reinstalling cobbler with yum to make sure no library files
>> are changed, but no help there.
> 
> 
> The issue seems to be that I created directory "files" under
> /var/lib/cobbler.  Taking out the exception handling from config.py reveals:
> 
> 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.6/site-packages/cobbler/api.py", line 130, in
> __init__
>    self.deserialize()
>  File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 795, in
> deserialize
>    return self._config.deserialize()
>  File "/usr/lib/python2.6/site-packages/cobbler/config.py", line 263,
> in deserialize
>    serializer.deserialize(item)
>  File "/usr/lib/python2.6/site-packages/cobbler/serializer.py", line
> 122, in deserialize
>    rc = storage_module.deserialize(obj,topological)
>  File
> "/usr/lib/python2.6/site-packages/cobbler/modules/serializer_catalog.py", line
> 229, in deserialize
>    datastruct = deserialize_raw(obj.collection_type())
>  File
> "/usr/lib/python2.6/site-packages/cobbler/modules/serializer_catalog.py", line
> 174, in deserialize_raw
>    fd = open(old_filename)
> IOError: [Errno 21] Is a directory: '/var/lib/cobbler/files'
> 
> 
> renaming that to something else fixes the issue, though I still wonder
> what is the logic...
> 
> 
> 
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://fedorahosted.org/mailman/listinfo/cobbler
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to