This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 815597 - Koan 2.2.2 incompatible with older versions of Cobbler (Verified on Cobbler 2.0.3.1)
Koan 2.2.2 incompatible with older versions of Cobbler (Verified on Cobbler 2...
Status: CLOSED WONTFIX
Product: Virtualization Tools
Classification: Community
Component: virtinst (Show other bugs)
unspecified
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Cole Robinson
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2012-04-24 10:11:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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 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 )
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:

https://github.com/cobbler/cobbler/issues
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.