mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-29 18:45:29 +00:00
close tunnel after migration is finish.
if we do not close it, there is a change that the tunnel stays open and the next migration will not work.
This commit is contained in:
parent
7d4e30f389
commit
386c6ba7f5
@ -520,6 +520,14 @@ sub phase2 {
|
|||||||
die "unable to parse migration status '$stat->{status}' - aborting\n";
|
die "unable to parse migration status '$stat->{status}' - aborting\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#to be sure tat the tunnel is closed
|
||||||
|
if ($self->{tunnel}) {
|
||||||
|
eval { finish_tunnel($self, $self->{tunnel}); };
|
||||||
|
if (my $err = $@) {
|
||||||
|
$self->log('err', $err);
|
||||||
|
$self->{errors} = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub phase2_cleanup {
|
sub phase2_cleanup {
|
||||||
@ -552,6 +560,14 @@ sub phase2_cleanup {
|
|||||||
$self->log('err', $err);
|
$self->log('err', $err);
|
||||||
$self->{errors} = 1;
|
$self->{errors} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($self->{tunnel}) {
|
||||||
|
eval { finish_tunnel($self, $self->{tunnel}); };
|
||||||
|
if (my $err = $@) {
|
||||||
|
$self->log('err', $err);
|
||||||
|
$self->{errors} = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub phase3 {
|
sub phase3 {
|
||||||
@ -621,14 +637,6 @@ sub phase3_cleanup {
|
|||||||
$self->{errors} = 1;
|
$self->{errors} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($self->{tunnel}) {
|
|
||||||
eval { finish_tunnel($self, $self->{tunnel}); };
|
|
||||||
if (my $err = $@) {
|
|
||||||
$self->log('err', $err);
|
|
||||||
$self->{errors} = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# always deactivate volumes - avoid lvm LVs to be active on several nodes
|
# always deactivate volumes - avoid lvm LVs to be active on several nodes
|
||||||
eval {
|
eval {
|
||||||
my $vollist = PVE::QemuServer::get_vm_volumes($conf);
|
my $vollist = PVE::QemuServer::get_vm_volumes($conf);
|
||||||
|
Loading…
Reference in New Issue
Block a user