Bug 853980

Summary: koan does not inject a kickstart file with qemu virtual install
Product: [Fedora] Fedora Reporter: Tim Coote <tim+redhat.com>
Component: koanAssignee: Orphan Owner <extras-orphan>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 17CC: awood, extras-orphan, jeckersb, peter, scott, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-01 00:18:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Coote 2012-09-03 13:24:21 UTC
Description of problem:
running the command:
sudo koan --virt --virt-name=xxx  --server=puppet   --system=xxx
on a system with qemu based virtualisation does not inject the kickstart file into the boot process.  

The output from:
print results
in virt_net_install in app.py, after calling create_func, looks like this:
- ['virt-install', '--connect', 'qemu:///system', '--name', 'robot', '--ram', '1024', '--vcpus', '1', '--autostart', '--vnc', '--hvm', '--location', 'http://172.17.31.77/cblr/links/f17-i386/', '--arch', 'i386', '--os-variant', 'generic26', '--disk', 'path=/var/lib/libvirt/images//robot-disk0,size=5', '--network', 'bridge=vmbridge', '--mac=00:16:3e:4d:79:04', '--wait', '0', '--noautoconsole']

I think that the --hvm should also have the kickstart description appended to it. Lines 200-219 of /usr/lib/python2.7/site-packages/koan/virtinstall.py indicate that the --extra-args are not appended properly. If I delete the else: on 204 then the boot works ok, giving this output, and going on to act on the kickstart file:

- ['virt-install', '--connect', 'qemu:///system', '--name', 'robot', '--ram', '1024', '--vcpus', '1', '--autostart', '--vnc', '--hvm', '--extra-args=ks=http://172.17.31.77/cblr/svc/op/ks/system/robot ksdevice=link kssendmac lang= text ', '--location', 'http://172.17.31.77/cblr/links/f17-i386/', '--arch', 'i386', '--os-variant', 'generic26', '--disk', 'path=/var/lib/libvirt/images//robot-disk0,size=5', '--network', 'bridge=vmbridge', '--mac=00:16:3e:4d:79:04', '--wait', '0', '--noautoconsole']

Here's the relevant code snippet:
   198      if is_qemu and virt_type:
   199          if not disable_virt_type:
   200              cmd += "--virt-type %s " % virt_type
       
   201      if fullvirt or is_qemu or is_import:
   202          if fullvirt is not None:
   203              cmd += "--hvm "
   204          else:
   205              cmd += ("--extra-args=\"%s\" " % (extra))
   206          if is_xen:
   207              cmd += "--pxe "
       
   208          elif cdrom:
   209              cmd += "--cdrom %s " % cdrom
   210          elif location:
   211              cmd += "--location %s " % location
   212          elif importpath:
   213              cmd += "--import "
       
   214          if arch:
   215              cmd += "--arch %s " % arch
   216      else:
   217          cmd += "--paravirt "
   218          cmd += ("--boot kernel=%s,initrd=%s,kernel_args=\"%s\" " %
   219                  (kernel, initrd, extra))

As I don't have anything more than my one installation, I've no idea whether just removing the else: appropriate or sufficient.

Version-Release number of selected component (if applicable):
Fedora 17
koan-2.2.3-2.fc17.noarch
qemu-1.0.1-1.fc17.i686

How reproducible:
Unclear - I'm not sure what are the key components involved in this scenario. However, assuming that it's just qemu and koan, it seems to be consistent.

Steps to Reproduce:
1. import an f17 profile
2. define a system based on the profile with a kickstart file
3. run the above koan command
  
Actual results:
kickstart not used by anaconda on the vm. Built command does not include --extra-args parameter


Expected results:
vm should launch and install using the kickstart.


Additional info:

Comment 1 Peter McNabb 2012-10-11 22:15:24 UTC
This is fixed in cobbler git:

commit 0db6b7dd829cc0e9c86411390267fea927021b2f
Author: Daichi Kamemoto <daikame>
Date:   Sat Jun 23 22:59:55 2012 +0900

    BUGFIX extra-args option problems

    - fix qemu haven't extra-args.
    - fix empty 'extra' params added 'extra-args=None' to virt-install.

What does it take to get a new version of cobbler released? And a Fedora build?

Comment 2 Fedora End Of Life 2013-07-03 22:24:32 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2013-08-01 00:18:39 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 4 Tim Ricketts 2013-08-01 06:38:11 UTC
Actually, I think it was fixed in Fedora 17 on 20th June in koan-2.4.0.  I don't appear to be able to change the status though.