[libvirt] [PATCH] libvirt: qemu: Fix domain termination caused by query-hotpluggable-cpus not enabled

Peter Krempa pkrempa at redhat.com
Fri Nov 25 09:07:19 UTC 2016


On Fri, Nov 25, 2016 at 10:03:38 +0100, Peter Krempa wrote:
> On Fri, Nov 25, 2016 at 09:19:18 +0100, Boris Fiuczynski wrote:

[...]

> >  src/qemu/qemu_process.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> > index f8f379a..675f5b5 100644
> > --- a/src/qemu/qemu_process.c
> > +++ b/src/qemu/qemu_process.c
> > @@ -3349,8 +3349,7 @@ qemuProcessReconnect(void *opaque)
> >      /* If upgrading from old libvirtd we won't have found any
> >       * caps in the domain status, so re-query them
> 
> At reconnect the capabilities are taken from the status XML file, where
> they are saved for every instance specifically. This code is supposed to
> run

only when a very old version of libvirt did not save the capability
flags into the status XML. It's even explained in the comment above.

> 
> >       */
> > -    if (!priv->qemuCaps &&
> > -        !(priv->qemuCaps = virQEMUCapsCacheLookupCopy(caps,
> > +    if (!(priv->qemuCaps = virQEMUCapsCacheLookupCopy(caps,
> >                                                        driver->qemuCapsCache,
> >                                                        obj->def->emulator,
> >                                                        obj->def->os.machine)))
> 
> NACK, this certainly is not the right fix. Does the status XML have the
> 'query-hotpluggable-cpus' capability set? If it's so then it was
> probably mis-detected at start of the VM and should be fixed there.
> 
> If there is no such capability, then the reconnect code is broken
> somehow.
> 
> At any rate we should not re-detect the capabilities if they were
> reloaded properly from the XML.
> 
> Peter



> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161125/5231a40a/attachment-0001.sig>


More information about the libvir-list mailing list