[pve-devel] [PATCH cluster 2/2] avoid undefined quorate value on startup

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jun 30 16:35:37 CEST 2016


There's a small timespan where cfs_status.quorate is undefined,
from the cfs_status_init() call in pmxcfs until either call
cfs_set_quorate directly in pmxcfs.c as we are in local mode
or the first quorum notification callback sets it.

Until this it is not defined, so set it to 0 (false) on
initialization to avoid that

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 data/src/status.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/data/src/status.c b/data/src/status.c
index 3896fcb..489faa1 100644
--- a/data/src/status.c
+++ b/data/src/status.c
@@ -379,6 +379,8 @@ void cfs_status_init(void)
 
 	cfs_status.start_time = time(NULL);
 
+	cfs_status.quorate = 0;
+
 	cfs_status.vmlist = vmlist_hash_new();
 
 	cfs_status.kvhash = kventry_hash_new();
-- 
2.1.4




More information about the pve-devel mailing list