Bug 1260356

Summary: Error dialoge pop out when deleting running guest with disk on local storage
Product: Red Hat Enterprise Linux 7 Reporter: tingting zheng <tzheng>
Component: libvirtAssignee: Pavel Hrdina <phrdina>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: crobinso, dyuan, juzhou, mxie, mzhan, rbalakri, xiaodwan, yisun
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-09 17:33:35 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:
Attachments:
Description Flags
virt-manager debug info none

Description tingting zheng 2015-09-06 07:59:11 UTC
Created attachment 1070662 [details]
virt-manager debug info

Description of problem:
Error dialoge pop out when deleting running guest with disk type volume

Version-Release number of selected component (if applicable):
virt-manager-1.2.1-6.el7.noarch
libvirt-1.2.17-7.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Prepare a guest with disk type volume.
# virsh dumpxml test
    <disk type='volume' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source pool='default' volume='test.img'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

2.Boot the guest with disk type volume either via virsh or virt-manager GUI.
# virsh start test

3.From virt-manager GUI,right click the running guest->"Delete",make sure "Delete associated storage files" ticked,click "Delete",an error dialog pop out as below.
Errors encountered while removing certain storage devices.

cannot unlink file '/var/lib/libvirt/images/qcow2-test.qcow2': Success
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/delete.py", line 182, in _async_delete
    self._async_delete_path(conn, path, meter)
  File "/usr/share/virt-manager/virtManager/delete.py", line 228, in _async_delete_path
    vol.delete(0)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3348, in delete
    if ret == -1: raise libvirtError ('virStorageVolDelete() failed', vol=self)
libvirtError: cannot unlink file '/var/lib/libvirt/images/qcow2-test.qcow2': Success

4.The guest has been deleted,check the disk of the guest,it's still there and not be deleted.  
ll /var/lib/libvirt/images/qcow2-test.qcow2
-rw-r--r--. 1 qemu qemu 197120 Sep  6 14:38 /var/lib/libvirt/images/qcow2-test.qcow2

Actual results:
As description.

Expected results:
No error dialoge pop out when deleting running guests with disk type volume,and the disk will also be deleted.

Additional info:
Attached the debug info from virt-manager.

Comment 2 tingting zheng 2015-09-06 11:20:18 UTC
I can not reproduce this bug with:
virt-manager-1.2.1-6.el7.noarch
libvirt-1.2.17-6.el7.x86_64

But can reproduce this bug with:
virt-manager-1.2.1-6.el7.noarch
libvirt-1.2.17-7.el7.x86_64

It seems there are some changes for latest libvirt version,I doubt whether it is a libvirt bug.

Comment 3 Pavel Hrdina 2015-11-04 16:26:57 UTC
Moving to libvirt, It's not virt-manager bug.

Comment 4 Pavel Hrdina 2016-03-01 13:36:52 UTC
*** Bug 1312181 has been marked as a duplicate of this bug. ***

Comment 5 Cole Robinson 2016-03-09 17:33:35 UTC
Duping this to 1293804 which has more discussion

*** This bug has been marked as a duplicate of bug 1293804 ***