Comment 0 for bug 1840872

Revision history for this message
bugproxy (bugproxy) wrote :

== 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 <email address hidden>
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.