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

Alexandre DERUMIER aderumier at odiso.com
Thu Aug 16 10:28:19 CEST 2012


But, currently they are no $self->{errors} = 1 in phase2, only die when something bad happen.

also eval_int handle signal interrupt, so I can call phase2_cleanup is task is stopped.

so I think it's more clean to implemented that in AbstractMigrate.



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

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Jeudi 16 Août 2012 10:01:05 
Objet: RE: [pve-devel] [PATCH] phase2_cleanup is phase2 error 

I don't know why you want to change PVE/AbstractMigrate.pm? 
The code set an error flag ($self->{errors} = 1), so you should be able 
to handle those cases inside PVE/QemuMigrate.pm? 

> -----Original Message----- 
> From: Alexandre DERUMIER [mailto:aderumier at odiso.com] 
> Sent: Donnerstag, 16. August 2012 09:53 
> To: Dietmar Maurer 
> Cc: pve-devel at pve.proxmox.com 
> Subject: Re: [pve-devel] [PATCH] phase2_cleanup is phase2 error 
> 
> maybe can we add: 
> 
> if ($phase2err) && !$self->{target_initialized}{ 
> 
> 
> So it's only occur for kvm ? 
> 
> 
> 
> 
> ----- Mail original ----- 
> 
> De: "Alexandre DERUMIER" <aderumier at odiso.com> 
> À: "Dietmar Maurer" <dietmar at proxmox.com> 
> Cc: pve-devel at pve.proxmox.com 
> Envoyé: Jeudi 16 Août 2012 09:40:40 
> Objet: Re: [pve-devel] [PATCH] phase2_cleanup is phase2 error 
> 
> 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 
> 
> _______________________________________________ 
> 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 




-- 

-- 



	

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