You need to sign in or sign up before continuing.
  • D
    Fix preservation of errors across migration steps · 5e31df93
    Daniel P. Berrange 提交于
    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 a9d12c24 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.
    5e31df93
libvirt.c 400.6 KB