]> git.proxmox.com Git - pve-container.git/commitdiff
PVE::LXC::Config - implement $cleanup flag for get_replicatable_volumes
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 12 Jun 2017 07:13:27 +0000 (09:13 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 12 Jun 2017 07:13:27 +0000 (09:13 +0200)
src/PVE/LXC/Config.pm

index 8430b0749f48602211c863e34b437520510b85b5..fc3a2833dc793562b7b819d87b5015ff0ecb0197 100644 (file)
@@ -1247,7 +1247,7 @@ sub get_vm_volumes {
 }
 
 sub get_replicatable_volumes {
-    my ($class, $storecfg, $conf, $noerr) = @_;
+    my ($class, $storecfg, $conf, $cleanup, $noerr) = @_;
 
     my $volhash = {};
 
@@ -1256,10 +1256,10 @@ sub get_replicatable_volumes {
 
        return if !$volid;
 
-       return if defined($mountpoint->{replicate}) && !$mountpoint->{replicate};
+       return if !$cleanup && defined($mountpoint->{replicate}) && !$mountpoint->{replicate};
 
        if (!PVE::Storage::volume_has_feature($storecfg, 'replicate', $volid)) {
-           return if $noerr;
+           return if $cleanup || $noerr;
            die "missing replicate feature on volume '$volid'\n";
        }