Kaynağa Gözat

votequorum: fix handling of config updates

cmap changes are local to the node only and should not be broadcasted
as configuration changes.

if any change has happened to us, we will inform other nodes via
send_nodeinfo.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Fabio M. Di Nitto 14 yıl önce
ebeveyn
işleme
75b3dc0f4e
1 değiştirilmiş dosya ile 3 ekleme ve 18 silme
  1. 3 18
      exec/votequorum.c

+ 3 - 18
exec/votequorum.c

@@ -1093,33 +1093,18 @@ static void votequorum_refresh_config(
 	struct icmap_notify_value old_val,
 	void *user_data)
 {
-	unsigned int old_votes;
-	unsigned int old_expected;
-	unsigned int old_qdevice_votes;
-
 	ENTER();
 
-	old_votes = us->votes;
-	old_expected = us->expected_votes;
-	old_qdevice_votes = qdevice->votes;
-
 	/*
 	 * Reload the configuration
 	 */
 	votequorum_readconfig(VOTEQUORUM_READCONFIG_RUNTIME);
 
 	/*
-	 * Check for fundamental changes that we need to propogate
+	 * activate new config
 	 */
-	if (old_votes != us->votes) {
-		votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_NODE_VOTES, us->node_id, us->votes);
-	}
-	if (old_expected != us->expected_votes) {
-		votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_EXPECTED_VOTES, us->node_id, us->expected_votes);
-	}
-	if (old_qdevice_votes != qdevice->votes) {
-		votequorum_exec_send_reconfigure(VOTEQUORUM_RECONFIG_PARAM_NODE_VOTES, NODEID_QDEVICE, qdevice->votes);
-	}
+	votequorum_exec_send_nodeinfo(us->node_id);
+	votequorum_exec_send_nodeinfo(NODEID_QDEVICE);
 
 	LEAVE();
 }