Bug 2015279

Summary: Hotplugging a second a second block device cause the first one to disappear.
Product: Container Native Virtualization (CNV) Reporter: Alexander Wels <awels>
Component: StorageAssignee: Alexander Wels <awels>
Status: CLOSED ERRATA QA Contact: Yan Du <yadu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.9.0CC: alitke, cnv-qe-bugs, mrashish, ngavrilo, pelauter, yadu
Target Milestone: ---   
Target Release: 4.9.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: CNV v4.9.2-15 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-19 17:49:52 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:

Description Alexander Wels 2021-10-18 19:13:01 UTC
Description of problem:
As reported in https://github.com/kubevirt/kubevirt/issues/6564 hot plugging a second block device makes the first one disappear. The block device is no longer visible in the VM nor the host the VM is running on. This can cause the VM to pause on an io error.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Start a VM
2. Create 2 or more block volumes
3. Hotplug 1 volume into the VM. Note the disk is visible inside the VM
4. Hotplug another volume into the VM. Note the first disk is detached from the VM before the second one becomes visible. The first one never re-appears.

Actual results:
First volume disappears for no reason.

Expected results:
All hotplugged volumes should remain visible and accessible.


Additional info:

Comment 1 Natalie Gavrielov 2021-10-20 12:27:35 UTC
Alexander, do you think it's should also go in 4.9?

Comment 2 Alexander Wels 2021-10-20 12:28:32 UTC
Yes it should definitely go in 4.9.1, as the problem exists in 4.9.0

Comment 3 Yan Du 2022-01-04 02:44:55 UTC
Test on OCP-4.9.12 , CNV-v4.9.2-22, issue have been fixed.

  Volume Status:
    Hotplug Volume:
      Attach Pod Name:  hp-volume-tj56q
      Attach Pod UID:   b9c4c3c8-e59d-4bb4-91a3-e72b9e3669c8
    Message:            Successfully attach hotplugged volume blank-dv to VM
    Name:               blank-dv
    Persistent Volume Claim Info:
      Access Modes:
        ReadWriteOnce
      Capacity:
        Storage:    1Gi
      Volume Mode:  Block
    Phase:          Ready
    Reason:         VolumeReady
    Target:         sda
    Hotplug Volume:
      Attach Pod Name:  hp-volume-tj56q
      Attach Pod UID:   b9c4c3c8-e59d-4bb4-91a3-e72b9e3669c8
    Message:            Successfully attach hotplugged volume blank-dv2 to VM
    Name:               blank-dv2
    Persistent Volume Claim Info:
      Access Modes:
        ReadWriteOnce
      Capacity:
        Storage:    1Gi
      Volume Mode:  Block
    Phase:          Ready
    Reason:         VolumeReady
    Target:         sdb
    Name:           cloudinitdisk
    Size:           1048576
    Target:         vdb
    Name:           containerdisk
    Target:         vda


[fedora@fedora-1619697674-6212 ~]$ lsblk
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda      8:0    0   1G  0 disk 
sdb      8:16   0   1G  0 disk 
vda    252:0    0   4G  0 disk 
└─vda1 252:1    0   4G  0 part /
vdb    252:16   0   1M  0 disk 

$ oc rsh virt-launcher-fedora-1619697674-6212-27vls -c compute
sh-4.4# cd /var/run/kubevirt/hotplug-disks
sh-4.4# ls -l
total 0
brw-rw-rw-. 1 qemu qemu 251,  0 Jan  4 02:34 blank-dv
brw-rw-rw-. 1 qemu qemu 251, 16 Jan  4 02:38 blank-dv2

Comment 9 errata-xmlrpc 2022-01-19 17:49:52 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 (Moderate: OpenShift Virtualization 4.9.2 Images security and bug fix update), 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-2022:0191