[pve-devel] [PATCH] phase2_cleanup is phase2 error

Dietmar Maurer dietmar at proxmox.com
Thu Aug 16 09:25:40 CEST 2012


That seem to completely break PVE/OpenVZMigrate.pm?

> -----Original Message-----
> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> bounces at pve.proxmox.com] On Behalf Of Alexandre Derumier
> Sent: Montag, 13. August 2012 16:42
> To: pve-devel at pve.proxmox.com
> Subject: [pve-devel] [PATCH] phase2_cleanup is phase2 error
> 
> 
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  data/PVE/AbstractMigrate.pm |   15 ++++++++++-----
>  1 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/data/PVE/AbstractMigrate.pm b/data/PVE/AbstractMigrate.pm
> index ccfcfb6..4cb2fd0 100644
> --- a/data/PVE/AbstractMigrate.pm
> +++ b/data/PVE/AbstractMigrate.pm
> @@ -172,11 +172,16 @@ sub migrate {
>  	    if ($phase2err) {
>  		$self->{errors} = 1;
>  		$self->log('err', "online migrate failure - $phase2err");
> -	    }
> -	    eval { $self->phase2_cleanup($self->{vmid}, $phase2err); };
> -	    if (my $err = $@) {
> -		$self->log('err', $err);
> -		$self->{errors} = 1;
> +
> +		eval { $self->phase2_cleanup($self->{vmid}, $err); };
> +		if (my $tmperr = $@) {
> +		    $self->log('err', $tmperr);
> +		}
> +		eval { $self->final_cleanup($self->{vmid}); };
> +		    if (my $tmperr = $@) {
> +			$self->log('err', $tmperr);
> +		    }
> +		die $err;
>  	    }
>  	}
> 
> --
> 1.7.2.5
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list