]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix preservation of errors across migration steps
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 23 May 2011 16:48:36 +0000 (12:48 -0400)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 25 May 2011 15:47:48 +0000 (11:47 -0400)
commit5e31df933523ccd86a55235bc82bae8debc19a82
tree0a240d24e9933e4f1a05cc36c2d5c0df2b7b077e
parent03547eee92dc3548db777ad0c9201af34f242f85
Fix preservation of errors across migration steps

When doing migration, if an error occurs in Perform, it must not
be overwritten during Finish/Confirm steps. If an error occurs
in Finish, it must not be overwritten in Confirm.

Previous commit a9d12c2444e43a0d3e5135eb15b4b62a7c011427 added
code to qemudDomainMigrateFinish2 to preserve the error. This
is not the right place, because it is not applicable in non-p2p
migration. The src/libvirt.c virDomainMigrateV2/3 methods need
code to preserve errors for non-p2p migration, while the
doPeer2PeerMigrate2 and doPeer2PeerMigrate3 methods contain
code to preverse errors for p2p migration.

Remove the bogus error preservation from qemudDomainMigrateFinish2
and qemudDomainMigrateFinish3.

Fix virDomainMigrateV3 and doPeer2PeerMigrate3 so that they
preserve any error hit during the Finish3 step, before invoking
Confirm3.

Finally if qemuMigrationFinish fails to resume the CPUs, it must
preserve the error before tearing down the VM, so that VM cleanup
doesn't overwrite it.

* src/libvirt.c: Preserve error before invoking Confirm3
* src/qemu/qemu_driver.c: Remove bogus error preservation
  code in qemudDomainMigrateFinish2/qemudDomainMigrateFinish3
* src/qemu/qemu_migration.c: Preserve error before invoking Confirm3
  and after resume fails in qemuMigrationFinish.
src/libvirt.c
src/qemu/qemu_driver.c
src/qemu/qemu_migration.c