Activity log for bug #1840872

Date Who What changed Old value New value Message
2019-08-21 03:59:14 bugproxy bug added bug
2019-08-21 03:59:16 bugproxy tags architecture-ppc64le bugnameltc-168186 severity-high targetmilestone-inin---
2019-08-21 03:59:18 bugproxy ubuntu: assignee Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
2019-08-21 03:59:21 bugproxy affects ubuntu libvirt (Ubuntu)
2019-08-21 06:38:15 Andrew Cloke bug task added ubuntu-power-systems
2019-08-21 06:38:26 Andrew Cloke ubuntu-power-systems: importance Undecided High
2019-08-21 06:39:25 Andrew Cloke ubuntu-power-systems: assignee Canonical Server Team (canonical-server)
2019-08-21 07:15:42 Christian Ehrhardt  nominated for series Ubuntu Disco
2019-08-21 07:15:42 Christian Ehrhardt  bug task added libvirt (Ubuntu Disco)
2019-08-21 07:15:42 Christian Ehrhardt  nominated for series Ubuntu Bionic
2019-08-21 07:15:42 Christian Ehrhardt  bug task added libvirt (Ubuntu Bionic)
2019-08-21 07:15:50 Christian Ehrhardt  libvirt (Ubuntu Bionic): status New Triaged
2019-08-21 07:15:52 Christian Ehrhardt  libvirt (Ubuntu Disco): status New Triaged
2019-08-21 07:15:55 Christian Ehrhardt  libvirt (Ubuntu): status New Fix Released
2019-08-21 07:58:12 Andrew Cloke ubuntu-power-systems: status New Triaged
2019-08-21 11:13:51 Christian Ehrhardt  description == Comment: #0 - INDIRA P. JOGA - 2018-05-24 09:32:53 == Problem Description: =================== libvirt fails to check for duplicate address in hotplug xml & error out before even trying to hotplug anything. Steps to re-create: 1. boslcp4 is up with BMC:1.20 & PNOR: 20180420 levels 2. Guest is up with kernel root@boslcp3g5:~# uname -a Linux boslcp3g5 4.4.0-122-generic #146-Ubuntu SMP Mon Apr 23 15:33:25 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux root@boslcp3g5:~# uname -r 4.4.0-122-generic 3. boslcp3g5 guest is running with LTP run (45 hours) & stress-ng aio class ( 15 minutes). 4. Hotplug xml root@boslcp3:/home# cat hp-disk.xml <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/home/boslcp3g5_hpblk1'/> <target dev='sdd' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> 5.Tried hotplug with duplicate address root@boslcp3:/home# virsh attach-device boslcp3g5 hp-disk.xml --live error: Failed to attach device from hp-disk.xml error: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'scsi0-0-0-2' for device root@boslcp3:/home# root@boslcp3:/home# virsh list --all Id Name State ---------------------------------------------------- 3 boslcp3g2 running 4 boslcp3g3 running 7 boslcp3g4 running - boslcp3g1 shut off - boslcp3g5 shut off 6. Libvirt fails to check the duplicate address in hotplug xml & error before even trying to hotplug anything == Comment: #5 - Daniel Henrique Barboza - 2019-03-26 15:43:55 == The fix for this bug was pushed upstream: commit f1d6585300001c7b23b8796a0faa4411c3531996 Author: Daniel Henrique Barboza <danielhb413@gmail.com> Date: Fri Mar 15 18:06:45 2019 -0300 domain_conf: check device address before attach After this patch, Libvirt is checking for duplicated address before trying to do hotplug operations. [Impact] * Attaching a device to an already consumed address never was and will work. But the current error handling might affect the device currently at that address. Think: "Attach A at 1, Attach B at 1 => Fail clean up slot 1" * Upstream has a fix for this which better detects the bad case which helps to avoid this becoming an issue. [Test Case] Create two images to test with: qemu-img create -f qcow2 /var/lib/libvirt/images/test1.img 1G qemu-img create -f qcow2 /var/lib/libvirt/images/test2.img 1G Create a guest: $ uvt-simplestreams-libvirt --verbose sync --source http://cloud-images.ubuntu.com/daily arch=amd64 label=daily release=bionic $ uvt-kvm create --password ubuntu tests-scsi-hotplug arch=amd64 release=bionic label=daily Then edit and restart the guest to use a scsi disk, add: <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/test1.img'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='scsi' index='0' model='virtio-scsi'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </controller> Finally create a hotplug XML file with the second disk referring to the same address cat > hpdisk.xml << EOF <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/test2.img'/> <target dev='sdb' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> EOF Then try to attach this device to the guest $ virsh attach-device tests-scsi-hotplug hpdisk.xml Without the fix you will get (which has further negative implications, but is enough for the test): root@b:~# virsh attach-device tests-scsi-hotplug hpdisk.xml error: Failed to attach device from hpdisk.xml error: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'scsi0-0-0-0' for device With the fix you will get: root@b:~# virsh attach-device tests-scsi-hotplug hpdisk.xml error: Failed to attach device from hpdisk.xml error: Requested operation is not valid: Domain already contains a disk with that address [Regression Potential] * Attaching a device to an already consumed address already failed and will continue to fail. So no use case will change significantly due to the intended change. The regression one could think of is that the duplicate check would match for an allowed device attachment and block it, but from my review I think that will not happen. [Other Info] * n/a --- == Comment: #0 - INDIRA P. JOGA - 2018-05-24 09:32:53 == Problem Description: =================== libvirt fails to check for duplicate address in hotplug xml & error out before even trying to hotplug anything. Steps to re-create: 1. boslcp4 is up with BMC:1.20 & PNOR: 20180420 levels 2. Guest is up with kernel root@boslcp3g5:~# uname -a Linux boslcp3g5 4.4.0-122-generic #146-Ubuntu SMP Mon Apr 23 15:33:25 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux root@boslcp3g5:~# uname -r 4.4.0-122-generic 3. boslcp3g5 guest is running with LTP run (45 hours) & stress-ng aio class ( 15 minutes). 4. Hotplug xml root@boslcp3:/home# cat hp-disk.xml <disk type='file' device='disk'>       <driver name='qemu' type='qcow2'/>       <source file='/home/boslcp3g5_hpblk1'/>       <target dev='sdd' bus='scsi'/>       <address type='drive' controller='0' bus='0' target='0' unit='2'/>     </disk> 5.Tried hotplug with duplicate address root@boslcp3:/home# virsh attach-device boslcp3g5 hp-disk.xml --live error: Failed to attach device from hp-disk.xml error: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'scsi0-0-0-2' for device root@boslcp3:/home# root@boslcp3:/home# virsh list --all  Id Name State ----------------------------------------------------  3 boslcp3g2 running  4 boslcp3g3 running  7 boslcp3g4 running  - boslcp3g1 shut off  - boslcp3g5 shut off 6. Libvirt fails to check the duplicate address in hotplug xml & error before even trying to hotplug anything == Comment: #5 - Daniel Henrique Barboza - 2019-03-26 15:43:55 == The fix for this bug was pushed upstream: commit f1d6585300001c7b23b8796a0faa4411c3531996 Author: Daniel Henrique Barboza <danielhb413@gmail.com> Date: Fri Mar 15 18:06:45 2019 -0300     domain_conf: check device address before attach After this patch, Libvirt is checking for duplicated address before trying to do hotplug operations.
2019-08-22 08:24:39 Christian Ehrhardt  libvirt (Ubuntu Disco): status Triaged In Progress
2019-08-22 08:24:40 Christian Ehrhardt  libvirt (Ubuntu Bionic): status Triaged In Progress
2019-08-22 10:07:47 Andrew Cloke ubuntu-power-systems: status Triaged In Progress
2019-08-30 22:51:39 Steve Langasek libvirt (Ubuntu Disco): status In Progress Fix Committed
2019-08-30 22:51:43 Steve Langasek bug added subscriber Ubuntu Stable Release Updates Team
2019-08-30 22:51:48 Steve Langasek bug added subscriber SRU Verification
2019-08-30 22:51:53 Steve Langasek tags architecture-ppc64le bugnameltc-168186 severity-high targetmilestone-inin--- architecture-ppc64le bugnameltc-168186 severity-high targetmilestone-inin--- verification-needed verification-needed-disco
2019-09-12 07:23:37 Christian Ehrhardt  tags architecture-ppc64le bugnameltc-168186 severity-high targetmilestone-inin--- verification-needed verification-needed-disco architecture-ppc64le bugnameltc-168186 severity-high targetmilestone-inin--- verification-done verification-done-disco
2019-09-12 15:45:04 Robie Basak libvirt (Ubuntu Bionic): status In Progress Fix Committed
2019-09-12 15:45:08 Robie Basak tags architecture-ppc64le bugnameltc-168186 severity-high targetmilestone-inin--- verification-done verification-done-disco architecture-ppc64le bugnameltc-168186 severity-high targetmilestone-inin--- verification-done-disco verification-needed verification-needed-bionic
2019-09-12 16:15:47 Andrew Cloke ubuntu-power-systems: status In Progress Fix Committed
2019-09-12 17:19:56 bugproxy tags architecture-ppc64le bugnameltc-168186 severity-high targetmilestone-inin--- verification-done-disco verification-needed verification-needed-bionic architecture-ppc64le bugnameltc-168186 severity-high targetmilestone-inin18045 verification-done-disco verification-needed verification-needed-bionic
2019-09-13 08:10:33 Christian Ehrhardt  tags architecture-ppc64le bugnameltc-168186 severity-high targetmilestone-inin18045 verification-done-disco verification-needed verification-needed-bionic architecture-ppc64le bugnameltc-168186 severity-high targetmilestone-inin18045 verification-done verification-done-bionic verification-done-disco
2019-09-17 06:09:09 Łukasz Zemczak removed subscriber Ubuntu Stable Release Updates Team
2019-09-17 06:19:15 Launchpad Janitor libvirt (Ubuntu Disco): status Fix Committed Fix Released
2019-09-19 09:13:59 Launchpad Janitor libvirt (Ubuntu Bionic): status Fix Committed Fix Released
2019-09-19 09:32:49 Frank Heimes ubuntu-power-systems: status Fix Committed Fix Released