]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Adjust EndAsyncJob for qemuDomainSaveInternal error path
authorJohn Ferlan <jferlan@redhat.com>
Mon, 26 Jan 2015 19:13:22 +0000 (14:13 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 29 Jan 2015 17:10:41 +0000 (12:10 -0500)
commit8ff383366b659a07bdc8acacbfd2bf0a3ab76fc0
tree090b497c5680768e8c0d1403656275c2e3591fe3
parent522225684907af09ce4213a365cc98b5881e3eae
qemu: Adjust EndAsyncJob for qemuDomainSaveInternal error path

Commit id '540c339a' to fix issues with reference counting and transient
domains moved the qemuDomainObjEndAsyncJob call prior to the attempt to
restart the guest CPU's resulting in an error:

    error: Failed to save domain rhel70 to /tmp/pl/rhel70.save
    error: internal error: unexpected async job 3

when (ret != 0) - eg, the error path from qemuDomainSaveMemory.

This patch will adjust the logic to call the EndAsyncJob only after
we've tried to restart the guest CPUs. It also needs to adjust the
test for qemuDomainRemoveInactive to add the ret == 0 condition.

Additionally, if we get to endjob: because of some error earlier, then
we need to save that error in the event the CPU restart logic fails.
We don't want to return the error from CPU restart failure, rather we
want to return the error from the failed save that caused us to fall
into the retry to start the CPU logic.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_driver.c