Bug 744533

Summary: error_policy=none can't worked
Product: [Community] Virtualization Tools Reporter: zhe peng <zpeng>
Component: virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: berrange, hyao, jwu, mzhan, rwu
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-31 17:44:07 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description zhe peng 2011-10-09 05:40:28 EDT
Description of problem:
error_policy=none can't worked

Version-Release number of selected component (if applicable):
libvirt-0.9.4-16.el6
python-virtinst-0.600.0-3.el6
qemu-kvm-0.12.1.2-2.195.el6
kernel-2.6.32-206.el6


How reproducible:
always

Steps to Reproduce:

1.by virtinst man help page,error_policy can be one of "stop", "none", or "enospace"

2.run command line
#virt-install -n demo -r 1024 --disk path=/tmp/demo.img,size=4 --disk path=/dev/sda2,error_policy=none -c /dev/cdrom --vnc --debug --force

Sun, 09 Oct 2011 03:07:19 DEBUG    Launched with command line:
/usr/sbin/virt-install -n demo -r 1024 --disk path=/tmp/demo.img,size=4 --disk path=/dev/sda2,error_policy=none -c /dev/cdrom --vnc --debug --force
Sun, 09 Oct 2011 03:07:19 DEBUG    Requesting libvirt URI default
Sun, 09 Oct 2011 03:07:20 DEBUG    Received libvirt URI qemu:///system
Sun, 09 Oct 2011 03:07:20 DEBUG    Requesting virt method 'default', hv type 'default'.
Sun, 09 Oct 2011 03:07:20 DEBUG    Received virt method 'hvm'
Sun, 09 Oct 2011 03:07:20 DEBUG    Hypervisor name is 'kvm'
Sun, 09 Oct 2011 03:07:20 DEBUG    --graphics compat generated: vnc
Sun, 09 Oct 2011 03:07:20 DEBUG    Forcing return value of True to prompt '%s'
Sun, 09 Oct 2011 03:07:20 DEBUG    DistroInstaller location is a local file/path: /dev/cdrom
Sun, 09 Oct 2011 03:07:21 DEBUG    Guest.has_install_phase: True

Starting install...
Sun, 09 Oct 2011 03:07:21 DEBUG    Generated install XML:
<domain type='kvm'>
  <name>demo</name>
  <uuid>ab862d2e-1fbf-3af9-ede2-2f4963c99734</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/><apic/><pae/>
  </features>
  <clock offset="utc"/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' cache='none'/>
      <source file='/tmp/demo.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='qemu' cache='none' error_policy='none' io='native'/>
      <source dev='/dev/sda2'/>
      <target dev='hdb' bus='ide'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu'/>
      <source dev='/dev/cdrom'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='52:54:00:69:01:ed'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1'/>
    <console type='pty'/>
    <video>
      <model type='cirrus'/>
    </video>
  </devices>
</domain>

Sun, 09 Oct 2011 03:07:21 DEBUG    Generated boot XML:
<domain type='kvm'>
  <name>demo</name>
  <uuid>ab862d2e-1fbf-3af9-ede2-2f4963c99734</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/><apic/><pae/>
  </features>
  <clock offset="utc"/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' cache='none'/>
      <source file='/tmp/demo.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='qemu' cache='none' error_policy='none' io='native'/>
      <source dev='/dev/sda2'/>
      <target dev='hdb' bus='ide'/>
    </disk>
    <disk type='block' device='cdrom'>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='52:54:00:69:01:ed'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1'/>
    <console type='pty'/>
    <video>
      <model type='cirrus'/>
    </video>
  </devices>
</domain>

Sun, 09 Oct 2011 03:07:21 ERROR    internal error unknown disk error policy 'none'
Sun, 09 Oct 2011 03:07:21 DEBUG    Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 629, in start_install
    noboot=options.noreboot)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1223, in start_install
    noboot)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1291, in _create_guest
    dom = self.conn.createLinustart_xml or final_xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2063, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinu) failed', conn=self)
libvirtError: internal error unknown disk error policy 'none'
Sun, 09 Oct 2011 03:07:21 DEBUG    Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start demo
otherwise, please restart your installation.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start demo
otherwise, please restart your installation.


Actual results:
see reproduce step

Expected results:
no error output,installation will succeed.

Additional info:
error_policy=enospace and stop will all worked well
in libvirt , error_policy possible values are "stop", "report", "ignore", and "enospace"
refer bug 730909
Comment 2 Cole Robinson 2011-10-13 13:40:25 EDT
Whoops, that's supposed to be 'ignore'. Not a huge deal for 6.2 since this is new functionality, so deferring to 6.3
Comment 4 Cole Robinson 2011-12-09 18:17:46 EST
Not urgent, and given reduced capacity for virt-manager/virtinst, just moving
this to the upstream tracker.
Comment 5 Cole Robinson 2012-01-31 17:44:07 EST
Thanks for the report, upstream now:

http://git.fedorahosted.org/git?p=python-virtinst.git;a=commit;h=8a8ea12db239f5b40986ef65d857b2cb09bffffb