mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-30 22:41:05 +00:00
migrate: cleanup replica volume skip condition
This commit is contained in:
parent
1849c59288
commit
6e8044dcea
@ -861,10 +861,11 @@ sub phase3 {
|
|||||||
|
|
||||||
# destroy local copies
|
# destroy local copies
|
||||||
foreach my $volid (@$volids) {
|
foreach my $volid (@$volids) {
|
||||||
|
|
||||||
# do not destroy if new target is local_host
|
# do not destroy if new target is local_host
|
||||||
if (!($self->{vmconf}->{replica} && defined($synced_volumes->{$volid})
|
next if $self->{vmconf}->{replica} &&
|
||||||
&& $self->{vmconf}->{replica_target} eq $self->{opts}->{node}) ) {
|
defined($synced_volumes->{$volid}) &&
|
||||||
|
$self->{vmconf}->{replica_target} eq $self->{opts}->{node};
|
||||||
|
|
||||||
eval { PVE::Storage::vdisk_free($self->{storecfg}, $volid); };
|
eval { PVE::Storage::vdisk_free($self->{storecfg}, $volid); };
|
||||||
if (my $err = $@) {
|
if (my $err = $@) {
|
||||||
$self->log('err', "removing local copy of '$volid' failed - $err");
|
$self->log('err', "removing local copy of '$volid' failed - $err");
|
||||||
@ -873,7 +874,6 @@ sub phase3 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
sub phase3_cleanup {
|
sub phase3_cleanup {
|
||||||
my ($self, $vmid, $err) = @_;
|
my ($self, $vmid, $err) = @_;
|
||||||
|
Loading…
Reference in New Issue
Block a user