فهرست منبع

votequorum: disallow wait_for_all and qdevice operations

The problem here is that user expectations, when using both modes
at the same time, have not been set yet. There are 2/3 options
that need investigation.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Fabio M. Di Nitto 14 سال پیش
والد
کامیت
f12bfc5ad8
1فایلهای تغییر یافته به همراه14 افزوده شده و 0 حذف شده
  1. 14 0
      exec/votequorum.c

+ 14 - 0
exec/votequorum.c

@@ -925,6 +925,14 @@ static char *votequorum_readconfig_static(void)
 		return ((char *)"configuration error: quorum device is not compatible with auto_tie_breaker feature");
 		return ((char *)"configuration error: quorum device is not compatible with auto_tie_breaker feature");
 	}
 	}
 
 
+	if ((have_qdevice) && (wait_for_all)) {
+		/*
+		 * TODO: disable compat for now. There is a problem on expected_votes vs local votes
+		 *       when starting qdevice on one node only that makes cluster quorate view not correct.
+		 */
+		return ((char *)"configuration error: quorum device is not compatible with wait_for_all feature");
+	}
+
 	LEAVE();
 	LEAVE();
 
 
 	return (NULL);
 	return (NULL);
@@ -995,6 +1003,12 @@ static void votequorum_readconfig_dynamic(void)
 		update_qdevice_can_operate(0);
 		update_qdevice_can_operate(0);
 	}
 	}
 
 
+	if ((have_qdevice) && (wait_for_all)) {
+		log_printf(LOGSYS_LEVEL_CRIT, "configuration error: quorum.device is not compatible with wait_for_all");
+		log_printf(LOGSYS_LEVEL_CRIT, "disabling quorum device operations");
+		update_qdevice_can_operate(0);
+	}
+
 	/*
 	/*
 	 * if user specifies quorum.expected_votes + quorum.device but NOT the device.votes
 	 * if user specifies quorum.expected_votes + quorum.device but NOT the device.votes
 	 * we don't know what the quorum device should vote.
 	 * we don't know what the quorum device should vote.