]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: process: Save vcpu ordering information on reconnect
authorPeter Krempa <pkrempa@redhat.com>
Tue, 6 Jun 2017 05:39:25 +0000 (07:39 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 6 Jun 2017 05:39:25 +0000 (07:39 +0200)
vCPU ordering information would not be updated if a vCPU emerged or
disappeared during the time libvirtd is not running. This allowed to
create invalid configuration like:

    [...]
    <vcpu id='56' enabled='yes' hotpluggable='yes' order='57'/>
    <vcpu id='57' enabled='yes' hotpluggable='yes' order='58'/>
    <vcpu id='58' enabled='yes' hotpluggable='yes'/>

Call the function that records the information on reconnect.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1451251

src/qemu/qemu_process.c

index be031b56b95c424c8b137f968a14c3877c0dbfdd..32ba8e373d211cb18b9eb3ecdaade9c3b7cfeabe 100644 (file)
@@ -3492,6 +3492,8 @@ qemuProcessReconnect(void *opaque)
     if (qemuDomainRefreshVcpuInfo(driver, obj, QEMU_ASYNC_JOB_NONE, true) < 0)
         goto error;
 
+    qemuDomainVcpuPersistOrder(obj->def);
+
     if (qemuSecurityReserveLabel(driver->securityManager, obj->def, obj->pid) < 0)
         goto error;