[PATCH] votequorum: fix handling of expected_votes/votes changes from cmapctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Fabio M. Di Nitto" <fdinitto@xxxxxxxxxx>

and allow natural selection to take place....

Signed-off-by: Fabio M. Di Nitto <fdinitto@xxxxxxxxxx>
---
 exec/votequorum.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/exec/votequorum.c b/exec/votequorum.c
index 253f649..b2b8d58 100644
--- a/exec/votequorum.c
+++ b/exec/votequorum.c
@@ -1174,8 +1174,13 @@ static void votequorum_refresh_config(
 	struct icmap_notify_value old_val,
 	void *user_data)
 {
+	int old_votes, old_expected_votes;
+
 	ENTER();
 
+	old_votes = us->votes;
+	old_expected_votes = us->expected_votes;
+
 	/*
 	 * Reload the configuration
 	 */
@@ -1186,6 +1191,14 @@ static void votequorum_refresh_config(
 	 */
 	votequorum_exec_send_nodeinfo(us->node_id);
 	votequorum_exec_send_nodeinfo(VOTEQUORUM_QDEVICE_NODEID);
+	if (us->votes != old_votes) {
+		votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_NODE_VOTES,
+						 us->node_id, us->votes);
+	}
+	if (us->expected_votes != old_expected_votes) {
+		votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_EXPECTED_VOTES,
+						 us->node_id, us->expected_votes);
+	}
 
 	LEAVE();
 }
-- 
1.7.7.6

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux