Hi,
I'm having trouble adding a distro to cobbler. I'm trying to add Centos 6.2. I've tried both the 'cobbler distro add' as well as the 'cobbler import' routes. Both the commands seem to succeed, but when i run a 'cobbler sync' after that, i get the following exception:
copying files for distro: CentOS-6.2-x86_64 Exception occured: exceptions.AttributeError Exception value: 'NoneType' object has no attribute 'lower' Exception Info: File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 95, in run rc = self._run(self) File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 184, in runner return self.remote.api.sync(self.options.get("verbose",False),logger=self.logger) File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 611, in sync return sync.run() File "/usr/lib/python2.4/site-packages/cobbler/action_sync.py", line 116, in run self.pxegen.copy_distros() File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line 144, in copy_distros self.copy_single_distro_files(d) File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line 173, in copy_single_distro_files if utils.file_is_remote(kernel): File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 506, in file_is_remote file_loc_lc = file_location.lower()
!!! TASK FAILED !!!
# cobbler distro report --name=CentOS-6.2-x86_64 Name : CentOS-6.2-x86_64 Architecture : x86_64 Breed : redhat Comment : CentOS 6.2 Initrd : /var/www/cobbler/images/CentOS-6.2-x86_64/initrd.img Kernel : /var/www/cobbler/images/CentOS-6.2-x86_64/vmlinuz Kernel Options : {} Kernel Options (Post Install) : {} Kickstart Metadata : {'tree': 'http://mirror.centos.org/centos/6/os/x86_64/%27%7D Management Classes : [] OS Version : rhel6 Owners : ['admin'] Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Template Files : {}
The kernel and initrd files reported above are actually missing:
# ls /var/www/cobbler/images/CentOS-6.2-x86_64/initrd.img ls: /var/www/cobbler/images/CentOS-6.2-x86_64/initrd.img: No such file or directory
I even tried placing these files there manually when i was doing a 'distro add', but 'cobbler sync' seems to delete them from there! /var/log/cobbler/cobbler.log doesn't say much apart from the above exception. I'm running Cobbler 2.0.11.
Any help would be greatly appreciated.
-- TIA, siddharth.
# ls /var/www/cobbler/images/CentOS-6.2-x86_64/initrd.img ls: /var/www/cobbler/images/CentOS-6.2-x86_64/initrd.img: No such file or directory
I even tried placing these files there manually when i was doing a 'distro add', but 'cobbler sync' seems to delete them from there! /var/log/cobbler/cobbler.log doesn't say much apart from the above exception. I'm running Cobbler 2.0.11.
Sure, cobbler owns and manages that directory. You need to make sure the locations in the distro object exist somewhere else. If you imported, those are probably in /var/www/cobbler/ks_mirror as source locations.
The error is of course undesirable, and the application should give a better error in that case. (Patches welcome!)
On Wednesday 18 January 2012 08:17 PM, Michael DeHaan wrote:
# ls /var/www/cobbler/images/CentOS-6.2-x86_64/initrd.img ls: /var/www/cobbler/images/CentOS-6.2-x86_64/initrd.img: No such file or directory
I even tried placing these files there manually when i was doing a 'distro add', but 'cobbler sync' seems to delete them from there! /var/log/cobbler/cobbler.log doesn't say much apart from the above exception. I'm running Cobbler 2.0.11.
Sure, cobbler owns and manages that directory. You need to make sure the locations in the distro object exist somewhere else. If you imported, those are probably in /var/www/cobbler/ks_mirror as source locations.
Thanks a lot Michael. I reverted everything i'd done and placed the files under /var/www/cobbler/ks_mirror, that seemed to work.
The error is of course undesirable, and the application should give a better error in that case. (Patches welcome!)
Unfortunately, i don't know any python (yet) so can't really help there.
Maybe asking for too much here :-) but It would be great if the files and directories managed by cobbler were documented somewhere, so that cobbler newbies can get a better idea.
-- siddharth.
Maybe asking for too much here :-) but It would be great if the files and directories managed by cobbler were documented somewhere, so that cobbler newbies can get a better idea.
They are
https://github.com/cobbler/cobbler/wiki/File%20System%20Information
-- siddharth. _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org (mailto:cobbler@lists.fedorahosted.org) https://fedorahosted.org/mailman/listinfo/cobbler
cobbler@lists.fedorahosted.org