Re: [PATCH v2 3/8] qemu: Don't fail migration on save status failure

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

 




On 09/11/2015 09:26 AM, Jiri Denemark wrote:
> When we save status XML at the point during migration where we have
> already started the domain on destination, we can't really go back and
> abort migration. Thus the only thing we can do is to log a warning and
> report success.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
> 
> Notes:
>     Version 2:
>     - no change
> 
>  src/qemu/qemu_migration.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 48a4476..3ecc1e5 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -3816,10 +3816,8 @@ qemuMigrationConfirmPhase(virQEMUDriverPtr driver,
>                                                        VIR_DOMAIN_EVENT_RESUMED_MIGRATED);
>          }
>  
> -        if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
> +        if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
>              VIR_WARN("Failed to save status on vm %s", vm->def->name);

Should these virResetLastError() too?  Might even be nice to "get" that
last error and (ahem) use it as part of the VIR_WARN output ;-)

Seems reasonable otherwise - ACK

John
> -            goto cleanup;
> -        }
>      }
>  
>   done:
> @@ -5780,10 +5778,8 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
>          }
>  
>          if (virDomainObjIsActive(vm) &&
> -            virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
> +            virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
>              VIR_WARN("Failed to save status on vm %s", vm->def->name);
> -            goto endjob;
> -        }
>  
>          /* Guest is successfully running, so cancel previous auto destroy */
>          qemuProcessAutoDestroyRemove(driver, vm);
> 

--
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]