Hello everyone:
We have set up cobbler on rhel62 (and centos62, we've tried both) using the packages from epel.
Everything goes smoothly during the install. Once we try to import a distro (centos 6.2 minimal, in this case) we get errors stating the following:
received on stderr: adding distros associating repos associating kickstarts
There are contents located at /var/www/cobbler/ks_mirror/distro, but that appears to be it. When we run cobbler disto list nothing appears.
We upgraded to version 2.2.1 from epel-testing and receive the same errors.
I have seen https://github.com/cobbler/cobbler/issues/72 and am curious if we are seeing the same issue. If so, this appears to be fixed in 2.2.2. When will that rpm hit epel-testing?
Thanks for your help, Brandon
Exception Info: File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 89, in run rc = self._run(self) File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 185, in runner return self.remote.api.sync(self.options.get("verbose",False),logger=self.logger) File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 719, in sync return sync.run() File "/usr/lib/python2.6/site-packages/cobbler/action_sync.py", line 144, in run self.tftpd.write_boot_files() File "/usr/lib/python2.6/site-packages/cobbler/modules/manage_in_tftpd.py", line 107, in write_boot_files self.write_boot_files_distro(distro) File "/usr/lib/python2.6/site-packages/cobbler/modules/manage_in_tftpd.py", line 85, in write_boot_files_distro file_dst = templater.render(file,metadata,None) File "/usr/lib/python2.6/site-packages/cobbler/templar.py", line 100, in render if self.settings.default_template_type:
!!! TASK FAILED !!! [root@domino kickstarts]# cobbler distro report esx5-x86_64 Name : esx5-x86_64 Architecture : x86_64 TFTP Boot Files : {'$img_path/': '/var/www/cobbler/ks_mirror/esx5/*.*'} Breed : vmware Comment : esxi5.0.0 update 469512 Fetchable Files : {} Initrd : /var/www/cobbler/ks_mirror/esx5/s.v00 Kernel : /var/www/cobbler/ks_mirror/esx5/mboot.c32 Kernel Options : {} Kernel Options (Post Install) : {} Kickstart Metadata : {'http://192.168.10.1/cobbler/links/esx5-x86_64%7D': '~', '{tree:': '~'} Management Classes : [] OS Version : esxi5 Owners : ['admin'] Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Template Files : {}
Name : rhel5-x86_64 Architecture : x86_64 TFTP Boot Files : {} Breed : redhat Comment : rhel5.8 Fetchable Files : {} Initrd : /var/www/cobbler/ks_mirror/rhel5/images/pxeboot/initrd.img Kernel : /var/www/cobbler/ks_mirror/rhel5/images/pxeboot/vmlinuz Kernel Options : {} Kernel Options (Post Install) : {} Kickstart Metadata : {'{tree:': '~', 'http://192.168.10.1/cobbler/links/rhel5-x86_64%7D': '~'} Management Classes : [] OS Version : rhel5 Owners : ['admin'] Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Template Files : {}
I get above error on running "cobbler sync" importing vmware esxi . Problem seems to be TFTP Boot Files : {'$img_path/': '/var/www/cobbler/ks_mirror/esx5/*.*'}
I did not get any error after importing my rhel 5 distro
Can any help resolve
Thanks Bhargav
On Tue, Apr 3, 2012 at 4:31 PM, Bhargav_Joshi@ao.uscourts.gov wrote:
Exception Info: File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 89, in run rc = self._run(self) File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 185, in runner return self.remote.api.sync(self.options.get("verbose",False),logger=self.logger) File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 719, in sync return sync.run() File "/usr/lib/python2.6/site-packages/cobbler/action_sync.py", line 144, in run self.tftpd.write_boot_files() File "/usr/lib/python2.6/site-packages/cobbler/modules/manage_in_tftpd.py", line 107, in write_boot_files self.write_boot_files_distro(distro) File "/usr/lib/python2.6/site-packages/cobbler/modules/manage_in_tftpd.py", line 85, in write_boot_files_distro file_dst = templater.render(file,metadata,None) File "/usr/lib/python2.6/site-packages/cobbler/templar.py", line 100, in render if self.settings.default_template_type:
!!! TASK FAILED !!! [root@domino kickstarts]# cobbler distro report esx5-x86_64 Name : esx5-x86_64 Architecture : x86_64 TFTP Boot Files : {'$img_path/': '/var/www/cobbler/ks_mirror/esx5/*.*'} Breed : vmware Comment : esxi5.0.0 update 469512 Fetchable Files : {} Initrd : /var/www/cobbler/ks_mirror/esx5/s.v00 Kernel : /var/www/cobbler/ks_mirror/esx5/mboot.c32 Kernel Options : {} Kernel Options (Post Install) : {} Kickstart Metadata : {'http://192.168.10.1/cobbler/links/esx5-x86_64%7D': '~', '{tree:': '~'}
This is not right, it should be {'tree':'http://...%27%7D. I see it's doing it for both rhel and esx.
Management Classes : [] OS Version : esxi5 Owners : ['admin'] Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Template Files : {}
Name : rhel5-x86_64 Architecture : x86_64 TFTP Boot Files : {} Breed : redhat Comment : rhel5.8 Fetchable Files : {} Initrd : /var/www/cobbler/ks_mirror/rhel5/images/pxeboot/initrd.img Kernel : /var/www/cobbler/ks_mirror/rhel5/images/pxeboot/vmlinuz Kernel Options : {} Kernel Options (Post Install) : {} Kickstart Metadata : {'{tree:': '~', 'http://192.168.10.1/cobbler/links/rhel5-x86_64%7D': '~'} Management Classes : [] OS Version : rhel5 Owners : ['admin'] Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Template Files : {}
I get above error on running "cobbler sync" importing vmware esxi . Problem seems to be TFTP Boot Files : {'$img_path/': '/var/www/cobbler/ks_mirror/esx5/*.*'}
I did not get any error after importing my rhel 5 distro
Can any help resolve
Is that all the traceback there was? It looks incomplete.
Complete trace here.
cobbler-bounces@lists.fedorahosted.org wrote on 04/03/2012 06:39:52 PM:
From: James Cammarata jimi@sngx.net To: cobbler mailing list cobbler@lists.fedorahosted.org Date: 04/03/2012 06:40 PM Subject: Re: [cobbler] esxi with cobbler 2.3.1 Sent by: cobbler-bounces@lists.fedorahosted.org
On Tue, Apr 3, 2012 at 4:31 PM, Bhargav_Joshi@ao.uscourts.gov wrote:
Exception Info: File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 89,
in run
rc = self._run(self)
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line
185, in
runner return
self.remote.api.sync(self.options.get("verbose",False),logger=self.logger)
File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 719,
in sync
return sync.run()
File "/usr/lib/python2.6/site-packages/cobbler/action_sync.py",line
144,
in run self.tftpd.write_boot_files() File "/usr/lib/python2.6/site-packages/cobbler/modules/manage_in_tftpd.py",
line
107, in write_boot_files self.write_boot_files_distro(distro) File "/usr/lib/python2.6/site-packages/cobbler/modules/manage_in_tftpd.py",
line
85, in write_boot_files_distro file_dst = templater.render(file,metadata,None) File "/usr/lib/python2.6/site-packages/cobbler/templar.py", line
100, in
render if self.settings.default_template_type:
!!! TASK FAILED !!! [root@domino kickstarts]# cobbler distro report esx5-x86_64 Name : esx5-x86_64 Architecture : x86_64 TFTP Boot Files : {'$img_path/': '/var/www/cobbler/ks_mirror/esx5/*.*'} Breed : vmware Comment : esxi5.0.0 update 469512 Fetchable Files : {} Initrd : /var/www/cobbler/ks_mirror/esx5/s.v00 Kernel :
/var/www/cobbler/ks_mirror/esx5/mboot.c32
Kernel Options : {} Kernel Options (Post Install) : {} Kickstart Metadata : {'http://192.168.10.1/cobbler/links/esx5-x86_64%7D': '~', '{tree:': '~'}
This is not right, it should be {'tree':'http://...%27%7D. I see it's doing it for both rhel and esx.
Management Classes : [] OS Version : esxi5 Owners : ['admin'] Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Template Files : {}
Name : rhel5-x86_64 Architecture : x86_64 TFTP Boot Files : {} Breed : redhat Comment : rhel5.8 Fetchable Files : {} Initrd : /var/www/cobbler/ks_mirror/rhel5/images/pxeboot/initrd.img Kernel : /var/www/cobbler/ks_mirror/rhel5/images/pxeboot/vmlinuz Kernel Options : {} Kernel Options (Post Install) : {} Kickstart Metadata : {'{tree:': '~', 'http://192.168.10.1/cobbler/links/rhel5-x86_64%7D': '~'} Management Classes : [] OS Version : rhel5 Owners : ['admin'] Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Template Files : {}
I get above error on running "cobbler sync" importing vmware esxi .
Problem
seems to be TFTP Boot Files : {'$img_path/': '/var/www/cobbler/ks_mirror/esx5/*.*'}
I did not get any error after importing my rhel 5 distro
Can any help resolve
Is that all the traceback there was? It looks incomplete. _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
On Wed, Apr 4, 2012 at 9:20 AM, Bhargav_Joshi@ao.uscourts.gov wrote:
Complete trace here.
Did you install from source or RPM? If from RPM, could you do a "rpm -V cobbler" and look to see if the templar.py file was modified? If from source (and even if from RPM), take a look in the cobbler/templar.py file in the site-packages directory for your python version. You should see code similar to this in the __init__ function:
def __init__(self,config=None,logger=None): """ Constructor """
if logger is None: logger = clogger.Logger() self.logger = logger
if config is not None: self.config = config self.api = config.api self.settings = config.settings()
The important part is that last line, where it creates self.settings. The stack dump seems to be saying that doesn't exist in the Templar instance. If that looks ok, I'm not sure what the issue is. The manage_in_tftpd.py module creates the Templar class with a valid config (or it SHOULD be valid), so if there's an error there something is very messed up internally.
I'm not sure why we allow a Templar instance to be created optionally without a config, there doesn't seem to be a use for that, so I'm wondering if it should throw an error in that case.
You could modify the above code in templar.py to add a "else: raise Exception" to see if it is in fact being created without a proper config.
On Wed, Apr 4, 2012 at 5:17 PM, James Cammarata jimi@sngx.net wrote:
On Wed, Apr 4, 2012 at 9:20 AM, Bhargav_Joshi@ao.uscourts.gov wrote:
Complete trace here.
I actually just saw this when doing an import of both ESX and ESXi:
$ cobbler import --name=esxi-4.1u0 --path=/data/isos/esxi-4.1u0/ task started: 2012-04-05_000534_import task started (id=Media import, time=Thu Apr 5 00:05:34 2012) Found a vmware compatible signature: imagedd.bz2 adding distros creating new distro: esxi-4.1u0-x86_64 creating new profile: esxi-4.1u0-x86_64 associating kickstarts This is an ESXi4 distro - adding extra PXE files to boot-files list !!! TASK FAILED !!!
Log entries:
Thu Apr 5 00:05:42 2012 - INFO | an exception occured while running the import manager Thu Apr 5 00:05:42 2012 - INFO | error was: Templar instance has no attribute 'settings' Thu Apr 5 00:05:42 2012 - INFO | No import managers found a valid signature at the location specified
Never noticed it before, because the task still logs as successful and there's no error code (what I was actually trying to fix).
Dug into it more, and saw there's a reference to Templar in the tftpd manager that does not pass in a config:
80: templater = templar.Templar()
Changed that to this:
templater = templar.Templar(self.config)
And re-ran import:
$ cobbler import --name=esxi-4.1u0 --path=/data/isos/esxi-4.1u0/ task started: 2012-04-05_003159_import task started (id=Media import, time=Thu Apr 5 00:31:59 2012) Found a vmware compatible signature: imagedd.bz2 adding distros creating new distro: esxi-4.1u0-x86_64 creating new profile: esxi-4.1u0-x86_64 associating kickstarts This is an ESXi4 distro - adding extra PXE files to boot-files list *** TASK COMPLETE ***
This fix will be merged into master tonight. You can hand-edit that file for the time being, if you're not installing from the git repo.
On Tue, Apr 3, 2012 at 10:17 AM, Brandon Sawyers brandor5@gmail.com wrote:
Hello everyone:
We have set up cobbler on rhel62 (and centos62, we've tried both) using the packages from epel.
Everything goes smoothly during the install. Once we try to import a distro (centos 6.2 minimal, in this case) we get errors stating the following:
Sounds like the issue is the ISO - don't use the minimal, you need to make sure you're using the ISO that has the PXE isolinux on it.
received on stderr: adding distros associating repos associating kickstarts
There are contents located at /var/www/cobbler/ks_mirror/distro, but that appears to be it. When we run cobbler disto list nothing appears.
We upgraded to version 2.2.1 from epel-testing and receive the same errors.
I have seen https://github.com/cobbler/cobbler/issues/72 and am curious if we are seeing the same issue. If so, this appears to be fixed in 2.2.2. When will that rpm hit epel-testing?
Yes, this is an outstanding issue. We need to make cobbler complain more on an import if it imports 0 distros.
cobbler@lists.fedorahosted.org