Re: [PATCH 4/4] qemuMigrationSrcConfirm: Don't remove domain config if confirm phase fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 22, 2018 at 14:16:18 +0100, Michal Privoznik wrote:
> If migration is cancelled or confirm phase fails the domain
> should be kept on the source even if VIR_MIGRATE_UNDEFINE_SOURCE
> was requested.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/qemu/qemu_migration.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 3875ea828f..04bc55944f 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -3044,7 +3044,7 @@ qemuMigrationSrcConfirm(virQEMUDriverPtr driver,
>  
>      qemuMigrationJobFinish(driver, vm);
>      if (!virDomainObjIsActive(vm)) {
> -        if (flags & VIR_MIGRATE_UNDEFINE_SOURCE) {
> +        if (!cancelled && ret >= 0 && flags & VIR_MIGRATE_UNDEFINE_SOURCE) {

The success is normally indicated by ret == 0. I don't think
qemuMigrationSrcConfirmPhase would ever return anything > 0.

>              virDomainDeleteConfig(cfg->configDir, cfg->autostartDir, vm);
>              vm->persistent = 0;
>          }

Reviewed-by: Jiri Denemark <jdenemar@xxxxxxxxxx>

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux