From dc6929977d0a3605f225a328f55b9850a3c4def5 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sat, 6 May 2017 16:29:24 +0200 Subject: [PATCH] check replicate feature on any config update --- src/PVE/LXC/Config.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index 5dc24b3..547e7b5 100644 --- a/src/PVE/LXC/Config.pm +++ b/src/PVE/LXC/Config.pm @@ -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; } -- 2.39.2