Bug 1318490

Summary: detach disk failed and vm destroyed
Product: Red Hat Enterprise Linux 7 Reporter: Wayne Sun <gsun>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: abologna, dyuan, dzheng, rbalakri
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-17 07:16:14 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
vm xml
none
libvirtd log
none
vm qemu log none

Description Wayne Sun 2016-03-17 04:03:59 UTC
Created attachment 1137281 [details]
vm xml

Description of problem:
detach disk will fail and vm will be destroyed

Version-Release number of selected component (if applicable):
libvirt-1.3.2-1.el7.ppc64le
qemu-kvm-rhev-2.5.0-2.el7.ppc64le
kernel-3.10.0-327.el7.ppc64le


How reproducible:
always

Steps to Reproduce:
1. start and domain and attach a disk
# virsh start avocado-vt-vm1
Domain avocado-vt-vm1 started

# qemu-img info /tmp/libvirt-rhel-7.3-runtest-ppc64le-function-migration-4/test.img
image: /tmp/libvirt-rhel-7.3-runtest-ppc64le-function-migration-4/test.img
file format: raw
virtual size: 1.0G (1073741824 bytes)
disk size: 0


# virsh attach-disk avocado-vt-vm1 /tmp/libvirt-rhel-7.3-runtest-ppc64le-function-migration-4/test.img vdb
Disk attached successfully

# virsh dumpxml avocado-vt-vm1
...
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/usr/share/avocado/data/avocado-vt/images/jeos-21-64.qcow2'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/tmp/libvirt-rhel-7.3-runtest-ppc64le-function-migration-4/test.img'/>
      <backingStore/>
      <target dev='vdb' bus='virtio'/>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>
...

2. detach disk
# virsh detach-disk avocado-vt-vm1 vdb
error: Failed to detach disk
error: Unable to read from monitor: Connection reset by peer

3.

Actual results:
failed to detach disk

Expected results:
succeed


Additional info:

Comment 2 Wayne Sun 2016-03-17 04:05:00 UTC
Created attachment 1137282 [details]
libvirtd log

Comment 3 Wayne Sun 2016-03-17 04:05:33 UTC
Created attachment 1137283 [details]
vm qemu log

Comment 4 Wayne Sun 2016-03-17 07:16:14 UTC
Retested on x86 with latest qemu-kvm-rhev also failed, turns out bug 1318181 already filed for this, so mark this duplicated to it.

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