RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1936361 - Live detach packed vhostuser disk return success but none is deleted
Summary: Live detach packed vhostuser disk return success but none is deleted
Keywords:
Status: CLOSED DUPLICATE of bug 1935020
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: qing.wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-08 09:59 UTC by Han Han
Modified: 2022-09-28 01:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-10 11:44:40 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Han Han 2021-03-08 09:59:22 UTC
Description of problem:
As subjedct

Version-Release number of selected component (if applicable):
libvirt-7.0.0-8.module+el8.4.0+10233+8b7fd9eb.x86_64
qemu-kvm-5.2.0-10.module+el8.4.0+10217+cbdd2152.x86_64
Guest: kernel-5.11.0-1.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Start an VM
2. Attach the virtio disk with packed=on
Prepare as https://bugzilla.redhat.com/show_bug.cgi?id=1884659#c25

Disk xml:
<disk type='vhostuser' device='disk' snapshot='no'>
  <driver name='qemu' type='raw' packed="on"/>
  <source type='unix' path='/var/lib/libvirt/qemu/vhost.sock'/>
  <target dev='vdb' bus='virtio'/>
</disk>


➜ virsh attach-device rhel packed.xml
Device attached successfully


➜ virsh detach-device rhel packed.xml
Device detached successfully

However the disk is actually not detached:
➜  ~ virsh dumpxml rhel|xmllint --xpath //disk -
<disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/var/lib/libvirt/images/rhel.qcow2" index="1"/>
      <backingStore/>
      <target dev="vda" bus="virtio"/>
      <alias name="virtio-disk0"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/>
    </disk><disk type="vhostuser" device="disk" snapshot="no">
      <driver name="qemu" type="raw" packed="on"/>
      <source type="unix" path="/var/lib/libvirt/qemu/vhost.sock"/>
      <target dev="vdb" bus="virtio"/>
      <alias name="virtio-disk1"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x09" function="0x0"/>
    </disk>#  

The vhostdisk is in VM
[root@fedora ~]# lsblk /dev/vdb
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vdb  252:16   0  100M  0 disk 

QMP log of attach and detach:
613.269 > 0x7f0d28036020 {"execute":"chardev-add","arguments":{"id":"chr-vu-virtio-disk1","backend":{"type":"socket","data":{"addr":{"type":"unix","data":{"path":"/var/lib/libvirt/qemu/vhost.sock"}},"server":false}}},"id":"libvirt-385"}
613.276 < 0x7f0d28036020 {"return": {}, "id": "libvirt-385"}
613.276 > 0x7f0d28036020 {"execute":"device_add","arguments":{"driver":"vhost-user-blk-pci","packed":"on","bus":"pci.0","addr":"0x9","chardev":"chr-vu-virtio-disk1","id":"virtio-disk1"},"id":"libvirt-386"}
614.190 < 0x7f0d28036020 {"return": {}, "id": "libvirt-386"}
614.190 > 0x7f0d28036020 {"execute":"qom-list","arguments":{"path":"/machine/peripheral"},"id":"libvirt-387"}                                                                                             
614.192 < 0x7f0d28036020 {"return": [{"name": "type", "type": "string"}, {"name": "sound0-codec0", "type": "child<hda-duplex>"}, {"name": "virtio-disk1", "type": "child<vhost-user-blk-pci>"}, {"name": "virtio-disk0", "type": "child<virtio-blk-pci>"}, {"name": "virtio-serial0", "type": "child<virtio-serial-pci>"}, {"name": "video0", "type": "child<qxl-vga>"}, {"name": "serial0", "type": "child<isa-serial>"}, {"name": "balloon0", "type": "child<virtio-balloon-pci>"}, {"name": "sound0", "type": "child<intel-hda>"}, {                                                                                         

1162.402 > 0x7f0d28036020 {"execute":"device_del","arguments":{"id":"virtio-disk1"},"id":"libvirt-388"}                                                                                                   
1162.404 < 0x7f0d28036020 {"return": {}, "id": "libvirt-388"}
1167.404 > 0x7f0d28036020 {"execute":"qom-list","arguments":{"path":"/machine/peripheral"},"id":"libvirt-389"}                                                                                            
1167.407 < 0x7f0d28036020 {"return": [{"name": "type", "type": "string"}, {"name": "sound0-codec0", "type": "child<hda-duplex>"}, {"name": "virtio-disk1", "type": "child<vhost-user-blk-pci>"}, {"name": "virtio-disk0", "type": "child<virtio-blk-pci>"}, {"name": "virtio-serial0", "type": "child<virtio-serial-pci>"}, {"name": "video0", "type": "child<qxl-vga>"}, {"name": "serial0", "type": "child<isa-serial>"}, {"name": "balloon0", "type": "child<virtio-balloon-pci>"}, {"name": "sound0", "type": "child<intel-hda>"}, {  


Actual results:
As above

Expected results:
Disk detached

Additional info:
It is only reproduced with vhostuser disk and packed=on.

Comment 1 qing.wang 2021-03-09 01:12:22 UTC
please refer to Bug 1935020 - qemu guest failed boot when attach vhost-user-blk-pci with option packed=on.
I think it have issue to support packed on

Comment 3 John Ferlan 2021-09-08 21:41:36 UTC
Move RHEL-AV bugs to RHEL9. If necessary to resolve in RHEL8, then clone to the current RHEL8 release.

Comment 4 CongLi 2022-01-10 11:44:40 UTC

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


Note You need to log in before you can comment on or make changes to this bug.