]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Always refresh capabilities if no <guests> found
authorCole Robinson <crobinso@redhat.com>
Thu, 16 Apr 2015 18:51:26 +0000 (14:51 -0400)
committerCole Robinson <crobinso@redhat.com>
Mon, 27 Apr 2015 23:45:50 +0000 (19:45 -0400)
commitdc7c0de5875be43cdc702d524310fa5b42d538fc
treee03346d0035cc0b16f6bfc408b35cb2d75e3d248
parentab87fb1cbc2d9ecc042d92fcc109dbdd838bd2d3
qemu: Always refresh capabilities if no <guests> found

- Remove all qemu emulators
- Restart libvirtd
- Install qemu emulators
- Call 'virsh version' -> errors

The only thing that will force the qemu driver to refresh it's cached
capablities info is an explict API call to GetCapabilities.

However in the case when the initial caps lookup at driver connect didn't
find a single qemu emulator to poll, the driver is effectively useless
and really can't do anything until it's populated some qemu capabilities
info.

With the above steps, the user would have to either know about the
magic refresh capabilities call, or restart libvirtd to pick up the
changes.

Instead, this patch changes things so that every time a part of th
driver requests access to capabilities info, check to see if
we've previously seen any emulators. If not, force a refresh.

In the case of 'still no emulators found', this is still very quick, so
I can't think of a downside.

https://bugzilla.redhat.com/show_bug.cgi?id=1000116
(cherry picked from commit 95546c43de51a3d54f9a7f65059a6492a64d4f69)
(cherry picked from commit 9ebc1631b42aa2c4aad120d24f940771ec781852)
src/qemu/qemu_conf.c