summaryrefslogtreecommitdiff
path: root/ctdb/tcp
diff options
context:
space:
mode:
authorRonnie Sahlberg <sahlberg@samba.org>2008-02-22 09:42:52 +1100
committerRonnie Sahlberg <sahlberg@samba.org>2008-02-22 09:42:52 +1100
commit39539f60444b71306d5cd2a659b3bfb0f4e3de4f (patch)
tree6ab1083741b08175ee57b9d3c185736bab702956 /ctdb/tcp
parentc8503e06cd1f76af66d6256c38c40d9fa55599bd (diff)
downloadsamba-39539f60444b71306d5cd2a659b3bfb0f4e3de4f.tar.gz
Add a new parameter to /etc/sysconfig/ctdb
CTDB_START_AS_DISABLED="yes" and command line argument --start-as-disabled When set, this makes the ctdb node to always start in DISABLED mode and will thus not host any public ip addresses. The administrator must manually "ctdb enable" the node after it has started when the administrator wants the node to start hosting public ip addresses. Using this option it is possible to start ctdb on a node without causing any reallocation of ip addresses when it is starting. The node will still merge with the cluster and there will still be a recovery phase but the ip address allocations will not change in the cluster. (This used to be ctdb commit b93d29f43f5306c244c887b54a77bca8a061daf2)
Diffstat (limited to 'ctdb/tcp')
-rw-r--r--ctdb/tcp/tcp_connect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index f85e3dfdebe..0f14dec8c5e 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -313,7 +313,11 @@ static int ctdb_tcp_listen_automatic(struct ctdb_context *ctdb)
ctdb->address.address,
ctdb->address.port,
ctdb->pnn));
-
+ /* do we start out in DISABLED mode? */
+ if (ctdb->start_as_disabled != 0) {
+ ctdb->nodes[i]->flags |= NODE_FLAGS_DISABLED;
+ }
+
if (listen(ctcp->listen_fd, 10) == -1) {
goto failed;
}