** Description changed: + [ Impact ] + + * If a race condition occurs on libvirtd shutdown, + a QEMU domain status XML (/run/libvirt/qemu/*.xml) + might lose the QEMU-driver specific information, + such as '<monitor path=.../>'. + + * On the next libvirtd startup, the parsing of that + QEMU domain's status XML fails as '<monitor path=' + is not found: + + $ journalctl -b -u libvirtd.service | tail + ... + ... libvirtd[2789]: internal error: no monitor path + ... libvirtd[2789]: Failed to load config for domain 'test-vm' + + * As a result, the domain is not listed in `virsh list`, + and `virsh` commands to it fail. + + $ virsh list + Id Name State + -------------------- + + * The domain is still running, but libvirt considers + it as shutdown, which might cause conflicts/issues + with higher-level tools (e.g., openstack nova). + + $ virsh list --all + Id Name State + -------------------------- + - test-vm shut off + + $ pgrep -af qemu-system-x86_64 | cut -d, -f1 + 2638 /usr/bin/qemu-system-x86_64 -name guest=test-vm, + + [ Test Plan ] + + * Synthetic reproducer with GDB in comment #1. + + * On failure, the XML is saved *without* '<monitor path=' + and libvirt fails to parse the domain on startup. + The domain is *not* listed in `virsh list`. + + * On success, the XML is saved *with* '<monitor path=' + and libvirt correctly parses the domain on startup. + The domain is listed in `virsh list`. + + [ Regression Potential ] + + * The patch changes *where* in the libvirt qemu driver's + shutdown path the worker thread pool is stopped/freed: + from _after_ releasing other data to _before_ doing so. + + * Therefore, the potential for regression is limited to + the libvirt qemu driver's shutdown path, and would be + observed when stopping/restarting libvirtd.service. + + * The behavior during normal operation is not affected. + + [Original Description] + There's a race condition on libvirtd shutdown that might cause the domain status XML file(s) to lose the '<monitor path=...'> tag/field. This causes an error on libvirtd startup, and the domain is not listed/managed, despite it is still running. $ virsh list Id Name State ------------------------- 1 test-vm running - $ sudo systemctl restart libvirtd.service + $ sudo systemctl restart libvirtd.service $ journalctl -b -u libvirtd.service | tail ... ... libvirtd[2789]: internal error: no monitor path ... libvirtd[2789]: Failed to load config for domain 'test-vm' $ virsh list Id Name State -------------------- $ virsh list --all Id Name State -------------------------- - test-vm shut off $ pgrep -af qemu-system-x86_64 | cut -d, -f1 2638 /usr/bin/qemu-system-x86_64 -name guest=test-vm,
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2059272 Title: libvirt domain is not listed/managed after libvirt restart with messages "internal error: no monitor path" and "Failed to load config for domain" To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/2059272/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
