Description of problem: qcreate.py of Koan 2.2.2 tries to access a Key which does not exist on oder versions of cobbler. Version-Release number of selected component (if applicable): - Koan 2.2.2 - Cobbler 2.0.3.1 (or any version of Cobbler prior to the introduction of interface_type in profile_data["interfaces"] How reproducible: Consistently reproductible Steps to Reproduce: 1. Have a bleedingly new version of koan 2. Have an exceedingly old version of cobbler 3. Try to run an install: koan --server=server --virt --system=virt.sys.machine Actual results: Cobbler throws the following exception: [root@vmhost ~]# koan --server=autobuild --virt --system=police.sys.intra - looking for Cobbler at http://1.1.1.1:80/cobbler_api - reading URL: http://1.1.1.1/cblr/svc/op/ks/system/virt.sys.machine install_tree: http://1.1.1.1/cobbler/ks_mirror/SL6.2-x86_64/ libvirtd (pid 2036) is running... - using qemu hypervisor, type=kvm Tue, 24 Apr 2012 11:48:17 DEBUG No conn passed to Guest, opening URI 'qemu:///system' Tue, 24 Apr 2012 11:48:17 DEBUG DistroInstaller location is a network source. libvir: QEMU error : Domain not found: no domain with matching name 'virt.sys.machine' - adding disk: /var/lib/libvirt/images//virt.sys.machine-disk0 of size 80 (driver type=raw) <type 'exceptions.KeyError'> 'interface_type' File "/usr/lib/python2.6/site-packages/koan/app.py", line 245, in main k.run() File "/usr/lib/python2.6/site-packages/koan/app.py", line 385, in run self.virt() File "/usr/lib/python2.6/site-packages/koan/app.py", line 739, in virt return self.net_install(after_download) File "/usr/lib/python2.6/site-packages/koan/app.py", line 630, in net_install after_download(self, profile_data) File "/usr/lib/python2.6/site-packages/koan/app.py", line 737, in after_download self.virt_net_install(profile_data) File "/usr/lib/python2.6/site-packages/koan/app.py", line 1291, in virt_net_install qemu_net_type = self.qemu_net_type File "/usr/lib/python2.6/site-packages/koan/qcreate.py", line 190, in start_install if intf["interface_type"] in ("master","bond","bridge") or vlanpattern.match(iname) or iname.find(":") != -1: [root@vmhost ~]# (Note: the above has been obfuscated, the server is not actually on IP 1.1.1.1) Expected results: Virtual machine is created according to the corresponding system definition in cobbler. Additional info: The following ugly hack allows the install to proceed: [root@vmhost ~]# diff /usr/lib/python2.6/site-packages/koan/qcreate.py /usr/lib/python2.6/site-packages/koan/qcreate.py.modified-to-work-with-old-cobbler 187a188 > print "- Parsing for interface: %s" % iname 190c191,194 < if intf["interface_type"] in ("master","bond","bridge") or vlanpattern.match(iname) or iname.find(":") != -1: --- > print "- Parsing for intf: %s" % intf > # This is a dirty hack and should never be done - Jon 2012/04/23 > #if intf["interface_type"] in ("master","bond","bridge") or vlanpattern.match(iname) or iname.find(":") != -1: > if vlanpattern.match(iname) or iname.find(":") != -1: [root@vmhost ~]# (Essentially just removed the following code: intf["interface_type"] in ("master","bond","bridge") or )
My understanding is you can't mix and match koan and cobbler versions, since they basically have an internal API. Either way, this is not where upstream cobbler bugs should be filed: https://github.com/cobbler/cobbler/issues
Suspected it would be something along these lines but thought I'd log it just in case. Thanks for the feedback, and I'll log any other issues I have with cobbler at github instead.