]> git.proxmox.com Git - pve-container.git/commitdiff
Revert "migrate: cleanup replica volume skip condition"
authorDietmar Maurer <dietmar@proxmox.com>
Sat, 6 May 2017 09:05:21 +0000 (11:05 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 6 May 2017 09:05:21 +0000 (11:05 +0200)
This reverts commit e8b22494e9f2b7d5afd663f91b1574a097c66bf0.

src/PVE/LXC/Migrate.pm

index 6d6c2d0687aa8213bf578e504f232977d138513d..0d3452825daa6620a148ea86a6e612920f206226 100644 (file)
@@ -330,15 +330,14 @@ sub phase3 {
     # destroy local copies
     foreach my $volid (@$volids) {
        # do not destroy if new target is local_host
-       next if $self->{vmconf}->{replica} &&
-           defined($synced_volumes->{$volid}) &&
-           $self->{vmconf}->{replica_target} eq $self->{opts}->{node};
-       
-       eval { PVE::Storage::vdisk_free($self->{storecfg}, $volid); };
-       if (my $err = $@) {
-           $self->log('err', "removing local copy of '$volid' failed - $err");
-           $self->{errors} = 1;
-           last if $err =~ /^interrupted by signal$/;
+       if (!($self->{vmconf}->{replica} && defined($synced_volumes->{$volid})
+             && $self->{vmconf}->{replica_target} eq $self->{opts}->{node}) ) {
+           eval { PVE::Storage::vdisk_free($self->{storecfg}, $volid); };
+           if (my $err = $@) {
+               $self->log('err', "removing local copy of '$volid' failed - $err");
+               $self->{errors} = 1;
+               last if $err =~ /^interrupted by signal$/;
+           }
        }
     }
 }