[pve-devel] [RFC PATCH guest-common] replication: purge states: verify the vmlist

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Oct 11 09:36:45 CEST 2017


Instead of clearing out the local state if the last
cfs_update failed.
---
Should there also be a quorum check in this function? Or should we leave
this up to the pve-manager side (pvesr cli tool / API entry points)?

 PVE/ReplicationState.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/ReplicationState.pm b/PVE/ReplicationState.pm
index 83ffa5b..567535a 100644
--- a/PVE/ReplicationState.pm
+++ b/PVE/ReplicationState.pm
@@ -197,6 +197,7 @@ sub purge_old_states {
     my $local_node = PVE::INotify::nodename();
 
     my $cfg = PVE::ReplicationConfig->new();
+    PVE::Cluster::cfs_update(1); # fail if we cannot query the vm list
     my $vms = PVE::Cluster::get_vmlist();
 
     my $used_tids = {};
-- 
2.11.0




More information about the pve-devel mailing list