[pve-devel] [PATCH] phase2_cleanup is phase2 error
Alexandre DERUMIER
aderumier at odiso.com
Thu Aug 16 11:04:43 CEST 2012
well, current code :
if ($self->{running}) {
&$eval_int($self, sub { $self->phase2($self->{vmid}); });
my $phase2err = $@;
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;
}
}
(note: phase2_cleanup don't exist in openvz)
replace with:
(die only if !$self->{target_initialized}, which is only initialized in openvz)
if ($self->{running}) {
&$eval_int($self, sub { $self->phase2($self->{vmid}); });
my $phase2err = $@;
if ($phase2err) {
$self->{errors} = 1;
$self->log('err', "online migrate failure - $phase2err");
eval { $self->phase2_cleanup($self->{vmid}, $err); };
if (my $tmperr = $@) {
$self->log('err', $tmperr);
}
die $phase2err if !$self->{target_initialized};
}
}
It shouldn't break the current openvz code.
----- 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:56:01
Objet: RE: [pve-devel] [PATCH] phase2_cleanup is phase2 error
> 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.
Sorry, but I can't commit patches which break openvz migration -
or what is the suggestion?
--
--
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