Hi!
I have a (CentOS 5.4) machine that's running Cobbler 2.0.3, which was upgraded from Cobbler 1.6.x. Now I can't create any sub-profiles that work.
My first problem was that "--inherit" doesn't seem to exist in Cobbler 2, but it looks like "--parent" has taken its place.
Now onto the main problem.
With Cobbler 1.6.x, I could create a sub-profile like so:
cobbler profile add \ --name=core-vm \ --inherit=centos-5-4-xen-x86_64 \ --kickstart=/var/lib/cobbler/kickstarts/sample.ks \ --repos="centos-5-x86_64-base centos-5-x86_64-extras centos-5-x86_64-updates epel-5-x86_64" \ --name-servers=192.168.1.254 \ --name-servers-search=mydomain.com.au \ --virt-ram=768 \ --virt-file-size=12 \ --virt-path=vgvirt
After the upgrade to Cobbler 2, I tried to create a similar sub-profile, like so:
cobbler profile add \ --name=core-vm-test \ --parent=centos-5-4-xen-x86_64 \ --kickstart=/var/lib/cobbler/kickstarts/sample.ks \ --repos="centos-5-x86_64-base centos-5-x86_64-extras centos-5-x86_64-updates epel-5-x86_64" \ --name-servers=192.168.1.254 \ --name-servers-search=mydomain.com.au \ --virt-ram=768 \ --virt-file-size=12 \ --virt-path=vgvirt
The sub-profile appears to have been created OK, but in the WUI the new sub-profile has an empty Distro:
Name Distro Actions centos-5-4-x86_64 centos-5-4-x86_64 Edit ... centos-5-4-xen-x86_64 centos-5-4-xen-x86_64 Edit ... core-vm <<inherit>> Edit ... core-vm-test Edit ... rescue-centos-5-4-x86_64 centos-5-4-x86_64 Edit ...
When I try to use koan to create a VM based on the new sub-profile, it fails:
[root@kane ~]# koan --virt --server=cobbler --system=testserv3 --static-interface=eth0 - looking for Cobbler at http://cobbler/cobbler_api - reading URL: http://192.168.1.11/cblr/svc/op/ks/system/testserv3 install_tree: http://192.168.1.11/cblr/links/centos-5-4-xen-x86_64 libvirtd (pid 3593) is running... downloading initrd initrd.img to /var/lib/xen/initrd.img url=http://cobbler/cobbler/images/~/initrd.img - reading URL: http://cobbler/cobbler/images/~/initrd.img Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/koan/utils.py", line 130, in urlread fd = urllib2.urlopen(url) File "/usr/lib64/python2.4/urllib2.py", line 130, in urlopen return _opener.open(url, data) File "/usr/lib64/python2.4/urllib2.py", line 364, in open response = meth(req, response) File "/usr/lib64/python2.4/urllib2.py", line 471, in http_response response = self.parent.error( File "/usr/lib64/python2.4/urllib2.py", line 402, in error return self._call_chain(*args) File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain result = func(*args) File "/usr/lib64/python2.4/urllib2.py", line 480, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 404: Not Found Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/koan/app.py", line 1024, in get_distro_files utils.urlgrab(initrd,initrd_save) File "/usr/lib/python2.4/site-packages/koan/utils.py", line 161, in urlgrab data = urlread(url) File "/usr/lib/python2.4/site-packages/koan/utils.py", line 143, in urlread raise InfoException, "Couldn't download: %s" % url InfoException: "Couldn't download: http://cobbler/cobbler/images/~/initrd.img" error downloading files [root@kane ~]#
It looks like its missing the distro component of the path to the initrd image: http://cobbler/cobbler/images/~/initrd.img
I'm sure there should be a distro name where the '~' is.
If I create a VM based on the original sub-profile (created with Cobbler 1.6.x), then it works fine. I can even create a copy of a sub-profile, and use that as the basis for a system; that system will also install fine.
Any ideas where to start with this?
Is this a regression, or have I missed something that's different with Cobbler 2?
Regards, Msquared...
This is still a problem in 2.0.4, and it does indeed appear to be the result of the distribution not being inherited properly. For a profile and sub-profile being created with...
cobbler profile add --name=fc12-i386 --distro=fc12-i386 --kickstart=/var/lib/cobbler/kickstarts/resune.ks cobbler profile add --name=${release}-i386-xen --parent=${release}-i386 --kickstart=/var/lib/cobbler/kickstarts/${release}_xenguest.ks --ksmeta="drive=xvda" --virt-file-size=33 --virt-ram=512
we get
# cobbler profile report --name fc12-i386-xen Name : fc12-i386-xen Comment : DHCP Tag : default Distribution : ~ Enable PXE Menu? : 1 Kernel Options : {} Kernel Options (Post Install) : {} Kickstart : /var/lib/cobbler/kickstarts/fc12_xenguest.ks Kickstart Metadata : {'drive': 'xvda'} Management Classes : [] Name Servers : [] Name Servers Search Path : [] Owners : ['admin'] Parent Profile : fc12-i386 Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Repos : [] Server Override : <<inherit>> Template Files : {} Virt Auto Boot : 1 Virt Bridge : xenbr0 Virt CPUs : 1 Virt File Size(GB) : 33 Virt Path : Virt RAM (MB) : 512 Virt Type : xenpv
# cobbler profile report --name=fc12-i386 Name : fc12-i386 Comment : DHCP Tag : default Distribution : fc12-i386 Enable PXE Menu? : 1 Kernel Options : {} Kernel Options (Post Install) : {} Kickstart : /var/lib/cobbler/kickstarts/resune.ks Kickstart Metadata : {} Management Classes : [] Name Servers : [] Name Servers Search Path : [] Owners : ['admin'] Parent Profile : Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Repos : [] Server Override : <<inherit>> Template Files : {} Virt Auto Boot : 1 Virt Bridge : xenbr0 Virt CPUs : 1 Virt File Size(GB) : 5 Virt Path : Virt RAM (MB) : 512 Virt Type : xenpv
and dumpvars shows "distro : ~"
If we had a guide on how to debug the cobbler server, I would see what I could come up with, but right now, I have not had a chance to track down how to do this with the new structure and then track down the issue.
- Doug
Quoting Msquared (1.cobbler@msquared.id.au):
Hi!
I have a (CentOS 5.4) machine that's running Cobbler 2.0.3, which was upgraded from Cobbler 1.6.x. Now I can't create any sub-profiles that work.
My first problem was that "--inherit" doesn't seem to exist in Cobbler 2, but it looks like "--parent" has taken its place.
Now onto the main problem.
With Cobbler 1.6.x, I could create a sub-profile like so:
cobbler profile add \ --name=core-vm \ --inherit=centos-5-4-xen-x86_64 \ --kickstart=/var/lib/cobbler/kickstarts/sample.ks \ --repos="centos-5-x86_64-base centos-5-x86_64-extras centos-5-x86_64-updates epel-5-x86_64" \ --name-servers=192.168.1.254 \ --name-servers-search=mydomain.com.au \ --virt-ram=768 \ --virt-file-size=12 \ --virt-path=vgvirt
After the upgrade to Cobbler 2, I tried to create a similar sub-profile, like so:
cobbler profile add \ --name=core-vm-test \ --parent=centos-5-4-xen-x86_64 \ --kickstart=/var/lib/cobbler/kickstarts/sample.ks \ --repos="centos-5-x86_64-base centos-5-x86_64-extras centos-5-x86_64-updates epel-5-x86_64" \ --name-servers=192.168.1.254 \ --name-servers-search=mydomain.com.au \ --virt-ram=768 \ --virt-file-size=12 \ --virt-path=vgvirt
The sub-profile appears to have been created OK, but in the WUI the new sub-profile has an empty Distro:
Name Distro Actions centos-5-4-x86_64 centos-5-4-x86_64 Edit ... centos-5-4-xen-x86_64 centos-5-4-xen-x86_64 Edit ... core-vm <<inherit>> Edit ... core-vm-test Edit ... rescue-centos-5-4-x86_64 centos-5-4-x86_64 Edit ...
When I try to use koan to create a VM based on the new sub-profile, it fails:
[root@kane ~]# koan --virt --server=cobbler --system=testserv3 --static-interface=eth0
- looking for Cobbler at http://cobbler/cobbler_api
- reading URL: http://192.168.1.11/cblr/svc/op/ks/system/testserv3
install_tree: http://192.168.1.11/cblr/links/centos-5-4-xen-x86_64 libvirtd (pid 3593) is running... downloading initrd initrd.img to /var/lib/xen/initrd.img url=http://cobbler/cobbler/images/~/initrd.img
- reading URL: http://cobbler/cobbler/images/~/initrd.img
Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/koan/utils.py", line 130, in urlread fd = urllib2.urlopen(url) File "/usr/lib64/python2.4/urllib2.py", line 130, in urlopen return _opener.open(url, data) File "/usr/lib64/python2.4/urllib2.py", line 364, in open response = meth(req, response) File "/usr/lib64/python2.4/urllib2.py", line 471, in http_response response = self.parent.error( File "/usr/lib64/python2.4/urllib2.py", line 402, in error return self._call_chain(*args) File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain result = func(*args) File "/usr/lib64/python2.4/urllib2.py", line 480, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 404: Not Found Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/koan/app.py", line 1024, in get_distro_files utils.urlgrab(initrd,initrd_save) File "/usr/lib/python2.4/site-packages/koan/utils.py", line 161, in urlgrab data = urlread(url) File "/usr/lib/python2.4/site-packages/koan/utils.py", line 143, in urlread raise InfoException, "Couldn't download: %s" % url InfoException: "Couldn't download: http://cobbler/cobbler/images/~/initrd.img" error downloading files [root@kane ~]#
It looks like its missing the distro component of the path to the initrd image: http://cobbler/cobbler/images/~/initrd.img
I'm sure there should be a distro name where the '~' is.
If I create a VM based on the original sub-profile (created with Cobbler 1.6.x), then it works fine. I can even create a copy of a sub-profile, and use that as the basis for a system; that system will also install fine.
Any ideas where to start with this?
Is this a regression, or have I missed something that's different with Cobbler 2?
Regards, Msquared... _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
cobbler@lists.fedorahosted.org