Bug 815597 - Koan 2.2.2 incompatible with older versions of Cobbler (Verified on Cobbler
Koan 2.2.2 incompatible with older versions of Cobbler (Verified on Cobbler 2...
Product: Virtualization Tools
Classification: Community
Component: virtinst (Show other bugs)
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Cole Robinson
Depends On:
  Show dependency treegraph
Reported: 2012-04-23 22:55 EDT by Jon Swanson
Modified: 2012-04-24 10:15 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-24 10:11:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jon Swanson 2012-04-23 22:55:04 EDT
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 (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
- reading URL:
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'>
  File "/usr/lib/python2.6/site-packages/koan/app.py", line 245, in main
   File "/usr/lib/python2.6/site-packages/koan/app.py", line 385, in run
   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
   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

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
> 	    print "- Parsing for interface: %s" % iname
<             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 )
Comment 1 Cole Robinson 2012-04-24 10:11:44 EDT
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:

Comment 2 Jon Swanson 2012-04-24 10:15:13 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.