Thanks for fixing it. /Chris > -----Original Message----- > From: Eric Blake [mailto:eblake@xxxxxxxxxx] > Sent: Wednesday, March 28, 2012 9:47 AM > To: Christian Benvenuti (benve) > Cc: Laine Stump; Libvirt > Subject: Re: [PATCH] qemu: Make migration fail when port profile association fails on the > dst host > > On 03/27/2012 02:27 PM, Christian Benvenuti (benve) wrote: > > In the current V3 migration protocol, Libvirt does not > > check the result of the function > > > > qemuMigrationVPAssociatePortProfiles > > > > This means that it is possible for a migration to complete > > successfully even when the VM loses network connectivity on > > the destination host. > > > > With this change libvirt aborts the migration > > (during the "finish" step) when the above function fails, that > > is to say when at least one of the port profile associations fails. > > > > Signed-off by: Christian Benvenuti <benve@xxxxxxxxx> > > > > --- > > src/qemu/qemu_migration.c | 20 ++++++++++++++++---- > > 1 files changed, 16 insertions(+), 4 deletions(-) > > > > @@ -2731,13 +2731,17 @@ qemuMigrationVPAssociatePortProfiles(virDomainDefPtr def) { > > virDomainNetGetActualDirectDev(net), > > -1, > > def->uuid, > > - VIR_NETDEV_VPORT_PROFILE_OP_MIGRATE_IN_FINISH, > false) < 0) > > + VIR_NETDEV_VPORT_PROFILE_OP_MIGRATE_IN_FINISH, > > + false) < 0) { > > + VIR_ERROR("Port profile Associate failed for %s", net->ifname); > > goto err_exit; > > VIR_ERROR is logged, but not propagated back to the caller; besides, > 'make syntax-check' warned that it was not a translated error message. > I'm applying this to convert to our preferred error reporting: > > diff --git i/src/qemu/qemu_migration.c w/src/qemu/qemu_migration.c > index c30c40b..49a260d 100644 > --- i/src/qemu/qemu_migration.c > +++ w/src/qemu/qemu_migration.c > @@ -2733,7 +2733,9 @@ > qemuMigrationVPAssociatePortProfiles(virDomainDefPtr def) { > def->uuid, > > VIR_NETDEV_VPORT_PROFILE_OP_MIGRATE_IN_FINISH, > false) < 0) { > - VIR_ERROR("Port profile Associate failed for %s", > net->ifname); > + qemuReportError(VIR_ERR_OPERATION_FAILED, > + _("Port profile Associate failed for %s"), > + net->ifname); > goto err_exit; > } > VIR_DEBUG("Port profile Associate succeeded for %s", > net->ifname); > > > > ACK with that fixed, so I added you to AUTHORS (let me know if you > prefer an alternate spelling), and pushed. > > -- > Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 > Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list