Thanks, I've updated the SRU template in regard to where issues would occur.
I think it is thereby ready for an upload to -unapproved. FYI We have another bug 2120278, targeting mostly the same releases, once that is fully ready (soon) we'll upload them together to do the related process steps just once. ** Description changed: This is a bug in libvirt which has been fixed in upstream: https://gitlab.com/libvirt/libvirt/-/issues/790 > When using qemu-pr-helper with multipath devices, the target devices are not added to the domain's namespace as well as cgroups. As a result, the sg_persist calls from the guest VM fail. And the fix will be available in the next release (v11.6.0), but needs to be backported to 22.04 and 24.04 as those are on 8.0.0 and 10.0.0 respectively. I'm working on patch for 22.04 followed by 24.04 --- [ Impact ] When using qemu-pr-helper with multipath devices, the target devices are not added to the domain's namespace as well as cgroups. As a result, the sg_persist calls from the guest VM fail. These are mostly used by clustered applications like Windows Cluster. [ Test Plan ] These steps help to reproduce the issue with the scsi_debug kernel module. We create a fake multipath device with 4 target disks, without the fix we can only see the device mapper device in qemu-pr-helper's mount namespace. 1. Get the scsi_debug kernel module and verify it is available. sudo apt install linux-modules-extra-$(uname -r) $ find /lib/modules/ -name "*scsi*" | grep debug /lib/modules/6.8.0-79-generic/kernel/drivers/scsi/scsi_debug.ko.zst 2. Ensure multipath-tools in installed on the system and multipathd service is running. sudo apt install multipath-tools sudo systemctl status multipathd.service 3. Create a multipath device with 4 target disks using scsi_debug sudo modprobe scsi_debug dev_size_mb=100 num_tgts=1 vpd_use_hostno=0 add_host=4 delay=20 max_luns=2 no_lun_0=1 $ sudo multipath -ll mpatha (1Linux_scsi_debug_2001) dm-0 Linux,scsi_debug size=100M features='0' hwhandler='1 alua' wp=rw |-+- policy='service-time 0' prio=1 status=enabled | `- 2:0:0:1 sda 8:0 active ready running |-+- policy='service-time 0' prio=1 status=enabled | `- 5:0:0:1 sdd 8:48 active ready running |-+- policy='service-time 0' prio=50 status=active | `- 3:0:0:1 sdb 8:16 active ready running `-+- policy='service-time 0' prio=50 status=enabled `- 4:0:0:1 sdc 8:32 active ready running Notice that the name is 1Linux_scsi_debug_2001 and it has 4 disks, sda to sdd. We will use the following path of the multipath device mapper disk when creating the VM, this points to dm-0. /dev/disk/by-id/dm-uuid-mpath-1Linux_scsi_debug_2001 $ ls -l /dev/disk/by-id/dm-uuid-mpath-1Linux_scsi_debug_2001 … /dev/disk/by-id/dm-uuid-mpath-1Linux_scsi_debug_2001 -> ../../dm-0 4. Create a new VM with reservations (starts qemu-pr-helper along with the qemu process for the VM). Use domain.xml from attachment: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/2117467/+attachment/5911261/+files/domain.xml Install libvirt first: sudo apt install libvirt-daemon libvirt-daemon-system libvirt-clients sudo systemctl start libvirtd Create the VM: sudo virsh define --file domain.xml --validate sudo virsh start libvirt-lp2117467 Verify it is in running state. sudo virsh list --all 5. Find the mount namespace of the VM, enter the namespace and verify the disks are added there. Find the PID of qemu-pr-helper or qemu-system-x86 $ pgrep qemu-pr-helper 734148 Enter the mount namespace of this process to verify all the target disks are present. In this example, we don't see the sda to sdd as libvirt is not patched. $ sudo nsenter --target 734148 --mount bash root@bhavin-build:/# ls /dev/ disk dm-0 full hugepages mapper mqueue null ptmx pts random shm urandom zero When the patched version is installed and VM is re-created, we should be able to see the target devices (sda to sdd) as well. root@bhavin-build:/# ls /dev/ block disk dm-0 full hugepages mapper mqueue null ptmx pts random sda sdb sdc sdd shm urandom zero # notice the sda, sdb, sdc, and sdd got added after installing update. [ Where problems could occur ] - This is a bugfix backport, not able to think any potential problem as of - now. + The bugfix is quite isolated to one particular area, the code handling device mapper references, things like /dev/disk/by-id/dm-* and what is can translate them to. Therefore the kind of potential regressions to look out for is exactly that, a handling of such targets in the guest configuration and how libvirt then uses them. Think of "device not found" or "can't access" for such devices due to + using the now correct names (in case there is a scenario where the old worked better). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2117467 Title: Multipath device's targets are not added to domain namespace/cgroup To manage notifications about this bug go to: https://bugs.launchpad.net/libvirt/+bug/2117467/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
