cluster: RHEL6 - cman: simply message broadcasting handling

Fabio M. Di Nitto fabbione at fedoraproject.org
Tue Jul 27 08:44:14 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=eee3205fab5933e6942c75b6e4739e2284976148
Commit:        eee3205fab5933e6942c75b6e4739e2284976148
Parent:        02e5f7ae8f8f49e0facc33d202e48ae7041d5fe0
Author:        Fabio M. Di Nitto <fdinitto at redhat.com>
AuthorDate:    Tue Jul 27 10:13:08 2010 +0200
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Tue Jul 27 10:31:19 2010 +0200

cman: simply message broadcasting handling

the timer that automatically attempts to reload the configuration
is never invoked in cases where broadcasting the message is required.

Remove the complexity in the code.

Resolves: rhbz#617161, rhbz#617163

Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 cman/daemon/commands.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 3bff57a..22ba50a 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -86,7 +86,6 @@ static int shutdown_yes;
 static int shutdown_no;
 static int shutdown_expected;
 static int ccsd_timer_active = 0;
-static int ccsd_timer_should_broadcast = 0;
 
 static struct cluster_node *find_node_by_nodeid(int nodeid);
 static struct cluster_node *find_node_by_name(char *name);
@@ -1203,7 +1202,6 @@ static int reload_config(int new_version, int should_broadcast)
 
 			if (!ccsd_timer_active) {
 				log_printf(LOG_ERR, "Error reloading the configuration, will retry every second\n");
-				ccsd_timer_should_broadcast = should_broadcast;
 				corosync->timer_add_duration((unsigned long long)ccsd_poll_interval*1000000, NULL,
 							     ccsd_timer_fn, &ccsd_timer);
 				ccsd_timer_active = 1;
@@ -1237,7 +1235,7 @@ static void ccsd_timer_fn(void *arg)
 
 	ccsd_timer_active = 0;	
 
-	if (!reload_config(wanted_config_version, ccsd_timer_should_broadcast) &&
+	if (!reload_config(wanted_config_version, 0) &&
 	    config_version >= wanted_config_version) {
 		log_printf(LOG_DEBUG, "ccsd_timer_fn got the new config\n");
 		config_error = 0;


More information about the cluster-commits mailing list