Comment 5 for bug 2059272

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Test case for normal operations in this code path:

Restart libvirt 100 times with 10 QEMU domains.

All domains continued to be managed by libvirt.
No error messages observed.

$ for NAME in test-vm-{1..10}; do cat <<-EOF >test-vms.xml && virsh define test-vms.xml && virsh start $NAME; done
<domain type='qemu'>
  <name>${NAME}</name>
  <os>
    <type>hvm</type>
  </os>
  <memory unit='MiB'>32</memory>
  <vcpu>1</vcpu>
</domain>
EOF

Domain 'test-vm-1' defined from test-vms.xml
Domain 'test-vm-1' started
...
Domain 'test-vm-10' defined from test-vms.xml
Domain 'test-vm-10' started

$ virsh list
 Id Name State
----------------------------
 6 test-vm-1 running
 7 test-vm-2 running
 8 test-vm-3 running
 9 test-vm-4 running
 10 test-vm-5 running
 11 test-vm-6 running
 12 test-vm-7 running
 13 test-vm-8 running
 14 test-vm-9 running
 15 test-vm-10 running

$ for i in {1..100}; do echo restart $i; sudo systemctl restart libvirtd.service; sleep 10; done
restart 1
...
restart 100

$ virsh list
 Id Name State
----------------------------
 6 test-vm-1 running
 7 test-vm-2 running
 8 test-vm-3 running
 9 test-vm-4 running
 10 test-vm-5 running
 11 test-vm-6 running
 12 test-vm-7 running
 13 test-vm-8 running
 14 test-vm-9 running
 15 test-vm-10 running

$ journalctl -b -u libvirtd.service | grep -v -e 'systemd' -e 'hostname:' | cut -d' ' -f7- | sort | uniq -c | sort -rn
    108 check dnsmasq binary /usr/sbin/dnsmasq: No such file or directory
    106 version: 8.0.0, package: 1ubuntu7.9 (Mauricio Faria de Oliveira <email address hidden> Wed, 27 Mar 2024 12:47:46 -0300)
      1 version: 8.0.0, package: 1ubuntu7.8 (Lena Voytek <email address hidden> Wed, 29 Nov 2023 14:52:52 -0700)