[pve-devel] [PATCH] phase2_cleanup is phase2 error
Alexandre Derumier
aderumier at odiso.com
Mon Aug 13 16:41:57 CEST 2012
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
More information about the pve-devel
mailing list