]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Don't update count of vCPUs if hot-plug fails silently
authorPeter Krempa <pkrempa@redhat.com>
Mon, 26 Aug 2013 12:34:56 +0000 (14:34 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 26 Aug 2013 12:47:19 +0000 (14:47 +0200)
When cpu hotplug fails without reporting an error, we would fail the
command but update the count of vCPUs anyways.

Commit 761fc481365703b861429d73a341bde352ba8d41 fixed the case when CPU
hot-unplug failed silently, but forgot to fix up the value in this case.

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

src/qemu/qemu_driver.c

index 0a8e518dd6c81d2a14060c86edf792c219437f91..c39f04d0101ebe70d3f6fb1fd52697333a9829bd 100644 (file)
@@ -3982,6 +3982,7 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
                        _("got wrong number of vCPU pids from QEMU monitor. "
                          "got %d, wanted %d"),
                        ncpupids, vcpus);
+        vcpus = oldvcpus;
         ret = -1;
         goto cleanup;
     }