[pve-devel] [RFC_V3 pve-guest-common] Replica parameters should be ignored by snapshot and restore.

Wolfgang Link w.link at proxmox.com
Mon Apr 24 17:15:34 CEST 2017


The replica are parameter that should not be changed by a rollback.
---
 PVE/AbstractConfig.pm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/PVE/AbstractConfig.pm b/PVE/AbstractConfig.pm
index 482f0e2..2cc4f4d 100644
--- a/PVE/AbstractConfig.pm
+++ b/PVE/AbstractConfig.pm
@@ -329,9 +329,12 @@ sub __snapshot_apply_config {
 	snapshots => $conf->{snapshots},
     };
 
-    # keep description and list of unused disks
+    # keep description, list of unused disks and replica parameters
     foreach my $k (keys %$conf) {
-	next if !($k =~ m/^unused\d+$/ || $k eq 'description');
+	next if !($k =~ m/^unused\d+$/ || $k eq 'description'
+		  || $k eq 'replica' || $k eq 'replica_interval'
+		  || $k eq 'replica_target' || $k eq 'replica_rate_limit');
+
 	$newconf->{$k} = $conf->{$k};
     }
 
-- 
2.1.4





More information about the pve-devel mailing list