Bug 1455150

Summary: Unable to detach virtio disk from pcie-root-port after migration
Product: Red Hat Enterprise Linux 7 Reporter: Han Han <hhan>
Component: qemu-kvm-rhevAssignee: Marcel Apfelbaum <marcel>
Status: CLOSED ERRATA QA Contact: jingzhao <jinzhao>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: ailan, chayang, drjones, dyuan, fjin, hhan, jinzhao, jizhao, juzhang, knoel, lmiksik, marcel, virt-maint, wehuang, xuzhang
Target Milestone: rcKeywords: Regression, TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.9.0-12.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-02 04:41:00 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:
Bug Depends On:    
Bug Blocks: 1449118, 1456511    

Description Han Han 2017-05-24 11:13:26 UTC
Description of problem:
As subject

Version-Release number of selected component (if applicable):
libvirt-3.2.0-5.el7.x86_64
qemu-kvm-rhev-2.9.0-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Start a q35 VM:
# virsh start test --console

2. Attach a virtio disk to pcie-root-port of pcie-root-port model:
# virsh attach-disk test /exports/raw vdb --address pci:0000.09.00.0
Disk attached successfully

The pcie-root-port:
  <controller type='pci' index='9' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='9' port='0x14'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    </controller>

3. Migrate the VM to another host:
# virsh migrate test qemu+ssh://xxxx/system --verbose --unsafe
Migration: [100 %]

4. In destination host, try to detach the disk by hmp command:
# virsh qemu-monitor-command test --hmp info block
drive-virtio-disk0 (#block157): /exports/test-1.qcow2 (qcow2)
    Cache mode:       writeback

drive-virtio-disk1 (#block303): /exports/raw (raw)
    Cache mode:       writeback

# virsh qemu-monitor-command test --hmp device_del virtio-disk1

# virsh qemu-monitor-command test --hmp info block             
drive-virtio-disk0 (#block157): /exports/test-1.qcow2 (qcow2)
    Cache mode:       writeback

drive-virtio-disk1 (#block303): /exports/raw (raw)
    Cache mode:       writeback

Detach failed but return success.

Actual results:
As step 4

Expected results:
Detach success.

Additional info:
The bug is not reproduced on pcie downstream port and ioh3420 model pcie-root-port.
Since default pcie-root-port works well in RHEL7.3, mark it as regression.

Comment 3 Marcel Apfelbaum 2017-06-02 06:56:01 UTC
Hi,
Can you please try it with ioh3420 on 7.4?

Thanks,
Marcel

Comment 4 Han Han 2017-06-02 06:59:15 UTC
(In reply to Marcel Apfelbaum from comment #3)
> Hi,
> Can you please try it with ioh3420 on 7.4?
> 
> Thanks,
> Marcel

I have said in the additional info. Bug was not reproduced on ioh3420 in 7.4.

Comment 5 Marcel Apfelbaum 2017-06-07 12:53:36 UTC
Patch posted upstream:
    https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg01751.html

Thanks,
Marcel

Comment 9 Miroslav Rezanina 2017-06-20 06:02:19 UTC
Fix included in qemu-kvm-rhev-2.9.0-12.el7

Comment 12 jingzhao 2017-06-20 07:44:30 UTC
*** Bug 1449118 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2017-08-02 04:41:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392