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

Alexandre DERUMIER aderumier at odiso.com
Thu Aug 16 09:40:40 CEST 2012


Sorry, I din't have nfs storage to test openvz migration.

openvz don't have phase2_cleanup, so what happen if openvz phase2 fail ?

Currently we go to phase3 if phase2 fail, is it normal ?


----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre Derumier" <aderumier at odiso.com>, pve-devel at pve.proxmox.com 
Envoyé: Jeudi 16 Août 2012 09:25:40 
Objet: RE: [pve-devel] [PATCH] phase2_cleanup is phase2 error 

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 





-- 

-- 



	

Alexandre D e rumier 

Ingénieur Systèmes et Réseaux 


Fixe : 03 20 68 88 85 

Fax : 03 20 68 90 88 


45 Bvd du Général Leclerc 59100 Roubaix 
12 rue Marivaux 75002 Paris 




More information about the pve-devel mailing list