]> git.proxmox.com Git - pve-container.git/commitdiff
check replicate feature on any config update
authorDietmar Maurer <dietmar@proxmox.com>
Sat, 6 May 2017 14:29:24 +0000 (16:29 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 6 May 2017 14:29:24 +0000 (16:29 +0200)
src/PVE/LXC/Config.pm

index 5dc24b32fde9c4e7cc2b99a20af849ac8720fddb..547e7b515a9d927a9bc67c20d30045d9608cb73f 100644 (file)
@@ -973,14 +973,18 @@ sub update_pct_config {
            next if $hotplug_error->($opt);
            $conf->{$opt} = $value;
        } elsif ($opt eq "replicate") {
-           # check replicate feature on all mountpoints
-           PVE::LXC::Config->get_replicatable_volumes($storecfg, $conf);
            my $repl = PVE::JSONSchema::check_format('pve-replicate', $value);
            PVE::Cluster::check_node_exists($repl->{target});
            $conf->{$opt} = $value;
        } else {
            die "implement me: $opt";
        }
+
+       if ($conf->{replicate}) {
+           # check replicate feature on all mountpoints
+           PVE::LXC::Config->get_replicatable_volumes($storecfg, $conf);
+       }
+
        PVE::LXC::Config->write_config($vmid, $conf) if $running;
     }