[SCM] CTDB repository - branch 1.2-nodeflags updated - ctdb-1.9.1-225-g256b4f4

Ronnie Sahlberg sahlberg at samba.org
Tue Nov 9 21:19:15 MST 2010


The branch, 1.2-nodeflags has been updated
       via  256b4f44d9de1b394d4f260f26fd11e2ff6adf8f (commit)
       via  b092a872662a45534d6fae41e3dc5e17c855c81e (commit)
       via  0e78edf4c8d35f42b8d678c22d752be94c542a6e (commit)
       via  7423943ee55b97d8d6c1ff3b9aa1b715c5e9addf (commit)
       via  4ce488c3b7ef840faed52f10b0920c91c813516c (commit)
       via  73d37c00d6947be301a97bc9500594df96988327 (commit)
       via  ec6b7a5ea85106b0f66405423d67213ec611cf72 (commit)
       via  bd8893b7f337219a04a47d98738584822af48f27 (commit)
       via  c260cbbce85e2ce337dd69c6eee57994c6b87eb4 (commit)
       via  04f5f5d0262cf57f9024b2dc466fd56904351beb (commit)
       via  ba84917eda3398f3adc24c48f7e29fc368aed630 (commit)
       via  42ab54294bc8b08e4d4818f0cd7fb96025eb4c33 (commit)
       via  17087f3a851e5e21d7d4155694f62849ca309558 (commit)
      from  ad7e42688e45a3a093c1476b5cceb07993cf7744 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2-nodeflags


- Log -----------------------------------------------------------------
commit 256b4f44d9de1b394d4f260f26fd11e2ff6adf8f
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Nov 10 14:47:28 2010 +1100

    Dont exit the update ip function if the old and new interfaces are the same
    since if they are the same for whatever reason this triggers the system
    to go into an infinite loop and is unrobust
    
    The scriptds have been changed instead to be able to cope with this
    situation for enhanced robustness
    
    During takeover_run and when merging all ip allocations across the cluster
    try to kepe track of when and which node currently hosts an ip address
    so that we avoid extra ip failovers between nodes

commit b092a872662a45534d6fae41e3dc5e17c855c81e
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Nov 10 14:46:45 2010 +1100

    change the takeover script timeout to 9 seconds from 5

commit 0e78edf4c8d35f42b8d678c22d752be94c542a6e
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Nov 10 14:46:05 2010 +1100

    Dont check remote ip allocation if public ip mgmt is disabled

commit 7423943ee55b97d8d6c1ff3b9aa1b715c5e9addf
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Nov 10 14:45:43 2010 +1100

    this stuff is just so fragile  that it will enter infinite recovery and fail loops
    on any kind of tiny unexpected error
    
    unconditionally try to remove ip addresses from both old and new interface
    before trying to add it to the new interface to make it less
    fragile

commit 4ce488c3b7ef840faed52f10b0920c91c813516c
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Nov 10 14:40:43 2010 +1100

    delete from old interface before adding to new interface
    this stops the script from failing with an error if
    both interfaces are specified as the same, which otherwise breaks and leads to an infinite recovery loop

commit 73d37c00d6947be301a97bc9500594df96988327
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Nov 10 12:59:25 2010 +1100

    delay loading the public ip address file until after we have started the transport and discovered ouw own pnn number

commit ec6b7a5ea85106b0f66405423d67213ec611cf72
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Nov 10 12:11:11 2010 +1100

    when we load the public address file,  at the same time check if we are already hosting the public address, if so, set ourselves up as the pnn for that address

commit bd8893b7f337219a04a47d98738584822af48f27
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Nov 10 12:06:05 2010 +1100

    dont check the public ip assignment or if even we are hosting them and shouldnt
    when public ips have been disabled

commit c260cbbce85e2ce337dd69c6eee57994c6b87eb4
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Nov 9 15:19:06 2010 +1100

    Add a new tunable : DisableIPFailover that when set to non 0
    will stopp any ip reallocations at all from happening.

commit 04f5f5d0262cf57f9024b2dc466fd56904351beb
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Nov 9 12:59:05 2010 +1100

    change the default for how long to waqit before dropping all ips to 120 seconds

commit ba84917eda3398f3adc24c48f7e29fc368aed630
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Nov 9 12:56:02 2010 +1100

    dont delete all ips from the system during the initial "init" event
    leave any ips as they are and let the recovery daemon remove them as required

commit 42ab54294bc8b08e4d4818f0cd7fb96025eb4c33
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Nov 9 12:55:20 2010 +1100

    when creating/adding a public ip, set the initial interface to be the first interface specified

commit 17087f3a851e5e21d7d4155694f62849ca309558
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Oct 28 13:43:57 2010 +1100

    Both nfs and nfslock scripts can fail under redhat in very rare situations.
    Ctdb can also be configured to ignore checking for knfsd and if it is alive.
    In that situation, no attempt will be made to restart nfs, and sicne nfs is not running,  lockd can not be restarted either.
    
    To workaround this, everytime we try to restart the lockmanager, also try to restart nfsd

-----------------------------------------------------------------------

Summary of changes:
 config/events.d/10.interface |   19 +++----------------
 config/events.d/60.nfs       |    1 +
 include/ctdb_client.h        |    2 +-
 include/ctdb_private.h       |    4 +++-
 server/ctdb_daemon.c         |   14 ++++++++++++--
 server/ctdb_recover.c        |   24 +++++++++++++++++++-----
 server/ctdb_recoverd.c       |   38 +++++++++++++++++++++-----------------
 server/ctdb_takeover.c       |   36 ++++++++++++++++++++++++++----------
 server/ctdb_tunables.c       |    5 +++--
 server/ctdbd.c               |   13 ++-----------
 10 files changed, 91 insertions(+), 65 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/10.interface b/config/events.d/10.interface
index 3dce668..640d3db 100755
--- a/config/events.d/10.interface
+++ b/config/events.d/10.interface
@@ -142,15 +142,6 @@ case "$1" in
 	[ -f /proc/sys/net/ipv4/conf/all/arp_filter ] && {
 	    echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
 	}
-	cat "$CTDB_PUBLIC_ADDRESSES" | cut -d/ -f1 | while read _IP; do
-		_IP_HELD=`/sbin/ip addr show | grep "inet $_IP/"`
-		[ -z "$_IP_HELD" ] || {
-			_IFACE=`echo $_IP_HELD | sed -e "s/.*\s//"`
-			_NM=`echo $_IP_HELD | sed -e "s/.*$_IP\///" -e "s/\s.*//"`
-			echo "Removing public address $_IP/$_NM from device $_IFACE"
-			delete_ip_from_iface $_IFACE $_IP $_NM
-		}
-	done
 	;;
 
      #############################
@@ -253,14 +244,10 @@ case "$1" in
 	iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null
 	iptables -I INPUT -i $oiface -d $ip -j DROP
 
-	# we make sure the interface is up first
-	add_ip_to_iface $niface $ip $maskbits || {
-		iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null
-		exit 1;
-	}
+	delete_ip_from_iface $oiface $ip $maskbits 2>/dev/null
+	delete_ip_from_iface $niface $ip $maskbits 2>/dev/null
 
-	delete_ip_from_iface $oiface $ip $maskbits || {
-		delete_ip_from_iface $niface $ip $maskbits
+	add_ip_to_iface $niface $ip $maskbits || {
 		iptables -D INPUT -i $oiface -d $ip -j DROP 2> /dev/null
 		exit 1;
 	}
diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index ed96ab8..57c81d3 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -82,6 +82,7 @@ case "$1" in
 	(ctdb_check_rpc "lockd" 100021 1)
 	[ $? = "0" ] || {
 		echo "Trying to restart lock manager service"
+		startstop_nfs restart
 		startstop_nfslock restart
 		exit 1
 	}
diff --git a/include/ctdb_client.h b/include/ctdb_client.h
index f4bd6f4..fff667b 100644
--- a/include/ctdb_client.h
+++ b/include/ctdb_client.h
@@ -105,7 +105,7 @@ int ctdb_ip_to_nodeid(struct ctdb_context *ctdb, const char *nodeip);
   start the ctdb protocol
 */
 int ctdb_start(struct ctdb_context *ctdb);
-int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog);
+int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog, const char *public_address_list);
 
 /*
   attach to a ctdb database
diff --git a/include/ctdb_private.h b/include/ctdb_private.h
index 0966d33..984d826 100644
--- a/include/ctdb_private.h
+++ b/include/ctdb_private.h
@@ -101,6 +101,7 @@ struct ctdb_tunable {
 	uint32_t deterministic_public_ips;
 	uint32_t reclock_ping_period;
 	uint32_t no_ip_failback;
+	uint32_t disable_ip_failover;
 	uint32_t verbose_memory_names;
 	uint32_t recd_ping_timeout;
 	uint32_t recd_ping_failcount;
@@ -454,7 +455,6 @@ struct ctdb_context {
 	uint32_t recovery_master;
 	struct ctdb_call_state *pending_calls;
 	struct ctdb_client_ip *client_ip_list;
-	bool do_checkpublicip;
 	struct trbt_tree *server_ids;	
 	const char *event_script_dir;
 	const char *notification_script;
@@ -1371,4 +1371,6 @@ int32_t ctdb_control_get_stat_history(struct ctdb_context *ctdb,
 				      struct ctdb_req_control *c,
 				      TDB_DATA *outdata);
 
+int ctdb_deferred_drop_all_ips(struct ctdb_context *ctdb);
+
 #endif
diff --git a/server/ctdb_daemon.c b/server/ctdb_daemon.c
index 5eca727..e322453 100644
--- a/server/ctdb_daemon.c
+++ b/server/ctdb_daemon.c
@@ -704,7 +704,7 @@ static void ctdb_setup_event_callback(struct ctdb_context *ctdb, int status,
 /*
   start the protocol going as a daemon
 */
-int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog)
+int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog, const char *public_address_list)
 {
 	int res, ret = -1;
 	struct fd_event *fde;
@@ -791,6 +791,14 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog)
 	if (ctdb->methods->initialise(ctdb) != 0) {
 		ctdb_fatal(ctdb, "transport failed to initialise");
 	}
+	if (public_address_list) {
+		ret = ctdb_set_public_addresses(ctdb, public_address_list);
+		if (ret == -1) {
+			DEBUG(DEBUG_ALERT,("Unable to setup public address list\n"));
+			exit(1);
+		}
+	}
+
 
 	/* attach to existing databases */
 	if (ctdb_attach_databases(ctdb) != 0) {
@@ -815,7 +823,9 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog)
 	tevent_fd_set_auto_close(fde);
 
 	/* release any IPs we hold from previous runs of the daemon */
-	ctdb_release_all_ips(ctdb);
+	if (ctdb->tunable.disable_ip_failover == 0) {
+		ctdb_release_all_ips(ctdb);
+	}
 
 	/* start the transport going */
 	ctdb_start_transport(ctdb);
diff --git a/server/ctdb_recover.c b/server/ctdb_recover.c
index 111d7a9..fe4275c 100644
--- a/server/ctdb_recover.c
+++ b/server/ctdb_recover.c
@@ -640,6 +640,22 @@ ctdb_drop_all_ips_event(struct event_context *ev, struct timed_event *te,
 }
 
 /*
+ * Set up an event to drop all public ips if we remain in recovery for too
+ * long
+ */
+int ctdb_deferred_drop_all_ips(struct ctdb_context *ctdb)
+{
+	if (ctdb->release_ips_ctx != NULL) {
+		talloc_free(ctdb->release_ips_ctx);
+	}
+	ctdb->release_ips_ctx = talloc_new(ctdb);
+	CTDB_NO_MEMORY(ctdb, ctdb->release_ips_ctx);
+
+	event_add_timed(ctdb->ev, ctdb->release_ips_ctx, timeval_current_ofs(ctdb->tunable.recovery_drop_all_ips, 0), ctdb_drop_all_ips_event, ctdb);
+	return 0;
+}
+
+/*
   set the recovery mode
  */
 int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb, 
@@ -659,11 +675,9 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
 		talloc_free(ctdb->release_ips_ctx);
 		ctdb->release_ips_ctx = NULL;
 	} else {
-		talloc_free(ctdb->release_ips_ctx);
-		ctdb->release_ips_ctx = talloc_new(ctdb);
-		CTDB_NO_MEMORY(ctdb, ctdb->release_ips_ctx);
-
-		event_add_timed(ctdb->ev, ctdb->release_ips_ctx, timeval_current_ofs(ctdb->tunable.recovery_drop_all_ips, 0), ctdb_drop_all_ips_event, ctdb);
+		if (ctdb_deferred_drop_all_ips(ctdb) != 0) {
+			DEBUG(DEBUG_ERR,("Failed to set up deferred drop all ips\n"));
+		}
 	}
 
 	if (recmode != ctdb->recovery_mode) {
diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index ed627f2..fc56088 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -1336,10 +1336,12 @@ static int ctdb_reload_remote_public_ips(struct ctdb_context *ctdb,
 			return -1;
 		}
 
-		if (rec->ip_check_disable_ctx == NULL) {
-			if (verify_remote_ip_allocation(ctdb, ctdb->nodes[j]->known_public_ips)) {
-				DEBUG(DEBUG_ERR,("Node %d has inconsistent public ip allocation and needs update.\n", ctdb->nodes[j]->pnn));
-				rec->need_takeover_run = true;
+		if (ctdb->tunable.disable_ip_failover == 0) {
+			if (rec->ip_check_disable_ctx == NULL) {
+				if (verify_remote_ip_allocation(ctdb, ctdb->nodes[j]->known_public_ips)) {
+					DEBUG(DEBUG_ERR,("Node %d has inconsistent public ip allocation and needs update.\n", ctdb->nodes[j]->pnn));
+					rec->need_takeover_run = true;
+				}
 			}
 		}
 
@@ -2535,18 +2537,20 @@ static int verify_local_ip_allocation(struct ctdb_context *ctdb, struct ctdb_rec
 	   active on the local node and wait for the recmaster
 	   to do a full blown recovery
 	*/
-	for (j=0; j<ips->num; j++) {
-		if (ips->ips[j].pnn == pnn) {
-			if (!ctdb_sys_have_ip(&ips->ips[j].addr)) {
-				DEBUG(DEBUG_CRIT,("Public address '%s' is missing and we should serve this ip\n",
-					ctdb_addr_to_str(&ips->ips[j].addr)));
-				need_takeover_run = true;
-			}
-		} else {
-			if (ctdb_sys_have_ip(&ips->ips[j].addr)) {
-				DEBUG(DEBUG_CRIT,("We are still serving a public address '%s' that we should not be serving.\n", 
-					ctdb_addr_to_str(&ips->ips[j].addr)));
-				need_takeover_run = true;
+	if (ctdb->tunable.disable_ip_failover == 0) {
+		for (j=0; j<ips->num; j++) {
+			if (ips->ips[j].pnn == pnn) {
+				if (!ctdb_sys_have_ip(&ips->ips[j].addr)) {
+					DEBUG(DEBUG_CRIT,("Public address '%s' is missing and we should serve this ip\n",
+						ctdb_addr_to_str(&ips->ips[j].addr)));
+					need_takeover_run = true;
+				}
+			} else {
+				if (ctdb_sys_have_ip(&ips->ips[j].addr)) {
+					DEBUG(DEBUG_CRIT,("We are still serving a public address '%s' that we should not be serving.\n", 
+						ctdb_addr_to_str(&ips->ips[j].addr)));
+					need_takeover_run = true;
+				}
 			}
 		}
 	}
@@ -3065,7 +3069,7 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
 	/* verify that we have all ip addresses we should have and we dont
 	 * have addresses we shouldnt have.
 	 */ 
-	if (ctdb->do_checkpublicip) {
+	if (ctdb->tunable.disable_ip_failover == 0) {
 		if (rec->ip_check_disable_ctx == NULL) {
 			if (verify_local_ip_allocation(ctdb, rec, pnn) != 0) {
 				DEBUG(DEBUG_ERR, (__location__ " Public IPs were inconsistent.\n"));
diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c
index d7fb5ad..d495807 100644
--- a/server/ctdb_takeover.c
+++ b/server/ctdb_takeover.c
@@ -490,15 +490,6 @@ static int32_t ctdb_do_updateip(struct ctdb_context *ctdb,
 		return -1;
 	}
 
-	if (vnn->iface == old) {
-		DEBUG(DEBUG_ERR,("update of IP %s/%u trying to "
-				 "assin a same interface '%s'\n",
-				 ctdb_addr_to_str(&vnn->public_address),
-				 vnn->public_netmask_bits,
-				 old->name));
-		return -1;
-	}
-
 	state = talloc(vnn, struct ctdb_do_updateip_state);
 	CTDB_NO_MEMORY(ctdb, state);
 
@@ -610,7 +601,7 @@ int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb,
 		return -1;
 	}
 
-	if (vnn->pnn != ctdb->pnn && have_ip) {
+	if (vnn->pnn != ctdb->pnn && have_ip && vnn->pnn != -1) {
 		DEBUG(DEBUG_CRIT,(__location__ " takeoverip of IP %s is known to the kernel, "
 				  "and we have it on iface[%s], but it was assigned to node %d"
 				  "and we are node %d, banning ourself\n",
@@ -895,6 +886,10 @@ static int ctdb_add_public_address(struct ctdb_context *ctdb,
 	vnn->public_address      = *addr;
 	vnn->public_netmask_bits = mask;
 	vnn->pnn                 = -1;
+	if (ctdb_sys_have_ip(addr)) {
+		DEBUG(DEBUG_ERR,("We are already hosting public address '%s'. setting PNN to ourself:%d\n", ctdb_addr_to_str(addr), ctdb->pnn));
+		vnn->pnn = ctdb->pnn;
+	}
 
 	for (i=0; vnn->ifaces[i]; i++) {
 		ret = ctdb_add_local_iface(ctdb, vnn->ifaces[i]);
@@ -905,6 +900,9 @@ static int ctdb_add_public_address(struct ctdb_context *ctdb,
 			talloc_free(vnn);
 			return -1;
 		}
+		if (i == 0) {
+			vnn->iface = ctdb_find_iface(ctdb, vnn->ifaces[i]);
+		}
 	}
 
 	DLIST_ADD(ctdb->vnn, vnn);
@@ -1159,6 +1157,16 @@ static uint32_t *ip_key(ctdb_sock_addr *ip)
 
 static void *add_ip_callback(void *parm, void *data)
 {
+	struct ctdb_public_ip_list *this_ip = parm; 
+	struct ctdb_public_ip_list *prev_ip = data; 
+
+	if (prev_ip == NULL) {
+		return parm;
+	}
+	if (this_ip->pnn == -1) {
+		this_ip->pnn = prev_ip->pnn;
+	}
+
 	return parm;
 }
 
@@ -1235,6 +1243,13 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap)
 	struct ctdb_client_control_state *state;
 	TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
 
+	/*
+	 * ip failover is completely disabled, just send out the 
+	 * ipreallocated event.
+	 */
+	if (ctdb->tunable.disable_ip_failover != 0) {
+		goto ipreallocated;
+	}
 
 	ZERO_STRUCT(ip);
 
@@ -1537,6 +1552,7 @@ finished:
 		return -1;
 	}
 
+ipreallocated:
 	/* tell all nodes to update natwg */
 	/* send the flags update natgw on all connected nodes */
 	data.dptr  = discard_const("ipreallocated");
diff --git a/server/ctdb_tunables.c b/server/ctdb_tunables.c
index 4a3cfbb..47694b7 100644
--- a/server/ctdb_tunables.c
+++ b/server/ctdb_tunables.c
@@ -34,7 +34,7 @@ static const struct {
 	{ "RecoverTimeout",      20,  offsetof(struct ctdb_tunable, recover_timeout) },
 	{ "RecoverInterval",      1,  offsetof(struct ctdb_tunable, recover_interval) },
 	{ "ElectionTimeout",      3,  offsetof(struct ctdb_tunable, election_timeout) },
-	{ "TakeoverTimeout",      5,  offsetof(struct ctdb_tunable, takeover_timeout) },
+	{ "TakeoverTimeout",      9,  offsetof(struct ctdb_tunable, takeover_timeout) },
 	{ "MonitorInterval",     15,  offsetof(struct ctdb_tunable, monitor_interval) },
 	{ "TickleUpdateInterval",20,  offsetof(struct ctdb_tunable, tickle_update_interval) },
 	{ "EventScriptTimeout",  30,  offsetof(struct ctdb_tunable, script_timeout) },
@@ -49,12 +49,13 @@ static const struct {
 	{ "DeterministicIPs",     1,  offsetof(struct ctdb_tunable, deterministic_public_ips) },
 	{ "ReclockPingPeriod",   60,  offsetof(struct ctdb_tunable,  reclock_ping_period) },
 	{ "NoIPFailback",         0,  offsetof(struct ctdb_tunable, no_ip_failback) },
+	{ "DisableIPFailover",    0,  offsetof(struct ctdb_tunable, disable_ip_failover) },
 	{ "VerboseMemoryNames",   0,  offsetof(struct ctdb_tunable, verbose_memory_names) },
 	{ "RecdPingTimeout",	 60,  offsetof(struct ctdb_tunable, recd_ping_timeout) },
 	{ "RecdFailCount",	 10,  offsetof(struct ctdb_tunable, recd_ping_failcount) },
 	{ "LogLatencyMs",         0,  offsetof(struct ctdb_tunable, log_latency_ms) },
 	{ "RecLockLatencyMs",  1000,  offsetof(struct ctdb_tunable, reclock_latency_ms) },
-	{ "RecoveryDropAllIPs",  60,  offsetof(struct ctdb_tunable, recovery_drop_all_ips) },
+	{ "RecoveryDropAllIPs", 120,  offsetof(struct ctdb_tunable, recovery_drop_all_ips) },
 	{ "VerifyRecoveryLock",   1,  offsetof(struct ctdb_tunable, verify_recovery_lock) },
 	{ "VacuumDefaultInterval", 300,  offsetof(struct ctdb_tunable, vacuum_default_interval) },
 	{ "VacuumMaxRunTime",     30,  offsetof(struct ctdb_tunable, vacuum_max_run_time) },
diff --git a/server/ctdbd.c b/server/ctdbd.c
index f8647f0..b90dbcd 100644
--- a/server/ctdbd.c
+++ b/server/ctdbd.c
@@ -207,6 +207,7 @@ int main(int argc, const char *argv[])
 
 	ctdb_tunables_set_defaults(ctdb);
 
+	ctdb->tunable.disable_ip_failover = options.no_publicipcheck;
 
 	ret = ctdb_set_recovery_lock_file(ctdb, options.recovery_lock_file);
 	if (ret == -1) {
@@ -299,14 +300,6 @@ int main(int argc, const char *argv[])
 		}
 	}
 
-	if (options.public_address_list) {
-		ret = ctdb_set_public_addresses(ctdb, options.public_address_list);
-		if (ret == -1) {
-			DEBUG(DEBUG_ALERT,("Unable to setup public address list\n"));
-			exit(1);
-		}
-	}
-
 	ret = ctdb_set_event_script_dir(ctdb, options.event_script_dir);
 	if (ret == -1) {
 		DEBUG(DEBUG_ALERT,("Unable to setup event script directory\n"));
@@ -323,8 +316,6 @@ int main(int argc, const char *argv[])
 
 	ctdb->valgrinding = options.valgrinding;
 
-	ctdb->do_checkpublicip = !options.no_publicipcheck;
-
 	if (options.max_persistent_check_errors < 0) {
 		ctdb->max_persistent_check_errors = 0xFFFFFFFFFFFFFFFFLL;
 	} else {
@@ -338,5 +329,5 @@ int main(int argc, const char *argv[])
 	}
 
 	/* start the protocol running (as a child) */
-	return ctdb_start_daemon(ctdb, interactive?False:True, options.use_syslog);
+	return ctdb_start_daemon(ctdb, interactive?False:True, options.use_syslog, options.public_address_list);
 }


-- 
CTDB repository


More information about the samba-cvs mailing list