1 file changed, 15 insertions(+), 4 deletions(-)
lib/common/membership.c | 19 +++++++++++++++----
# HG changeset patch
# User Andrew Beekhof <[EMAIL PROTECTED]>
# Date 1226349823 -3600
# Branch stable-1.0
# Node ID b517c3bb8c90e8a7a462b8b4beafa5e1c7cac448
# Parent a911aa1094d3546db05cf2b4196c1d84a8c91666
Medium: ais: Hook up the options for specifying the expected number of nodes and total quorum votes
diff --git a/lib/common/membership.c b/lib/common/membership.c
--- a/lib/common/membership.c
+++ b/lib/common/membership.c
@@ -125,20 +125,31 @@ void destroy_crm_node(gpointer data)
void crm_peer_init(void)
{
- const char *expected = getenv("HA_expected_votes");
+ const char *value = NULL;
quorum_stats.votes_max = 2;
quorum_stats.votes_active = 0;
quorum_stats.votes_total = 0;
quorum_stats.nodes_max = 1;
quorum_stats.nodes_total = 0;
- if(expected) {
- crm_notice("%s expected quorum votes", expected);
- quorum_stats.votes_max = crm_int_helper(expected, NULL);
+ value = getenv("HA_expected_votes");
+ if(value) {
+ crm_notice("%s expected quorum votes", value);
+ quorum_stats.votes_max = crm_int_helper(value, NULL);
+ }
+
+ value = getenv("HA_expected_nodes");
+ if(value) {
+ crm_notice("%s expected nodes", value);
+ quorum_stats.nodes_max = crm_int_helper(value, NULL);
}
if(quorum_stats.votes_max < 1) {
quorum_stats.votes_max = 1;
+ }
+
+ if(quorum_stats.nodes_max < 1) {
+ quorum_stats.nodes_max = 1;
}
crm_peer_destroy();
_______________________________________________
Pacemaker mailing list
[email protected]
http://list.clusterlabs.org/mailman/listinfo/pacemaker