Prechádzať zdrojové kódy

votequorum: two_node should enable wait_for_all by default

This avoids fencing races at startup of a cluster.

It is still possible to override WFA by explicitly setting
wait_for_all: 0

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
Fabio M. Di Nitto 14 rokov pred
rodič
commit
efbf5282f9
1 zmenil súbory, kde vykonal 6 pridanie a 0 odobranie
  1. 6 0
      exec/votequorum.c

+ 6 - 0
exec/votequorum.c

@@ -748,6 +748,12 @@ static int votequorum_readconfig_static(void)
 
 	log_printf(LOGSYS_LEVEL_DEBUG, "Reading static configuration");
 
+	icmap_get_uint8("quorum.two_node", &two_node);
+
+	if (two_node) {
+		wait_for_all = 1;
+	}
+
 	icmap_get_uint8("quorum.wait_for_all", &wait_for_all);
 	icmap_get_uint8("quorum.auto_tie_breaker", &auto_tie_breaker);
 	icmap_get_uint8("quorum.last_man_standing", &last_man_standing);