* Sun Jul 3 2005 Brendan O'Dea <bod@optus.net> 2.0.23
- Backout regular_cleanup changes.
+- Clear cluster_master on election so that slaves will accept a new master.
* Tue May 31 2005 Brendan O'Dea <bod@optusnet.com.au> 2.0.22
- Show session open time in "show session"/"show user" detailed output.
// L2TPNS Clustering Stuff
-char const *cvs_id_cluster = "$Id: cluster.c,v 1.26.2.11 2005/05/30 02:55:40 bodea Exp $";
+char const *cvs_id_cluster = "$Id: cluster.c,v 1.26.2.12 2005/07/03 02:58:06 bodea Exp $";
#include <stdio.h>
#include <stdlib.h>
return; // Everything's ok!
config->cluster_last_hb = TIME + 1; // Just the one election thanks.
+ config->cluster_master_address = 0;
LOG(0, 0, 0, "Master timed out! Holding election...\n");
// to become a master!!!
config->cluster_iam_master = 1;
- config->cluster_master_address = 0;
LOG(0, 0, 0, "I am declaring myself the master!\n");
// Note that after a clean failover, the cluster_master_address
// is cleared, so this doesn't run.
//
- if (config->cluster_master_address && addr != config->cluster_master_address
- && (config->cluster_last_hb + config->cluster_hb_timeout - 11) > TIME) {
+ if (config->cluster_master_address && addr != config->cluster_master_address) {
LOG(0, 0, 0, "Ignoring stray heartbeat from %s, current master %s has not yet timed out (last heartbeat %.1f seconds ago).\n",
fmtaddr(addr, 0), fmtaddr(config->cluster_master_address, 1),
0.1 * (TIME - config->cluster_last_hb));