2011/5/24 Daniel P. Berrange <berrange@xxxxxxxxxx>: > The current virDomainMigrateFinish3 method signature attempts to > distinguish two types of errors, by allowing return with ret== 0, > but ddomain == NULL, to indicate a failure to start the guest. > This is flawed, because when ret == 0, there is no way for the > virErrorPtr details to be sent back to the client. > > Change the signature of virDomainMigrateFinish3 so it simply > returns a virDomainPtr, in the same way as virDomainMigrateFinish2 > The disk locking code will protect against the only possible > failure mode this doesn't account for (loosing conenctivity to > libvirtd after Finish3 starts the CPUs, but before the client > sees the reply for Finish3). > > * src/driver.h, src/libvirt.c, src/libvirt_internal.h: Change > ÂvirDomainMigrateFinish3 to return a virDomainPtr instead of int > * src/remote/remote_driver.c, src/remote/remote_protocol.x, > Âdaemon/remote.c, src/qemu/qemu_driver.c, src/qemu/qemu_migration.c: > ÂUpdate for API change > --- > Âdaemon/remote.c       Â|  35 ++++++++--------------------------- > Âsrc/driver.h         |  Â5 ++--- > Âsrc/libvirt.c        Â|  41 ++++++++++++++++++++--------------------- > Âsrc/libvirt_internal.h    |  21 ++++++++++----------- > Âsrc/qemu/qemu_driver.c    |  21 +++++++++------------ > Âsrc/qemu/qemu_migration.c  Â|  19 ++++++++++--------- > Âsrc/remote/remote_driver.c  |  29 ++++------------------------- > Âsrc/remote/remote_protocol.x |  Â2 +- > Â8 files changed, 64 insertions(+), 109 deletions(-) > ACK. Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list