diff options
author | Martin Schwenke <martin@meltin.net> | 2013-05-03 16:59:20 +1000 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2013-05-07 16:20:46 +1000 |
commit | 0445c988e241c9528a339707ac0dcf49148b18c1 (patch) | |
tree | 27d8df6e1bed645d30957404250bdcd3784c6bd3 /ctdb/server/ctdb_tunables.c | |
parent | ac80824709f7feda8bf5a81ca9468897de902923 (diff) | |
download | samba-0445c988e241c9528a339707ac0dcf49148b18c1.tar.gz |
recoverd: Fix tunable NoIPTakeoverOnDisabled, rename to NoIPHostOnAllDisabled
This really needs to be per-node. The rename is because nodes with
this tunable switched on should drop IPs if they become unhealthy (or
disabled in some other way).
* Add new flag NODE_FLAGS_NOIPHOST, only used in recovery daemon.
* Enhance set_ipflags_internal() and set_ipflags() to setup
NODE_FLAGS_NOIPHOST depending on setting of NoIPHostOnAllDisabled
and/or whether nodes are disabled/inactive.
* Replace can_node_servce_ip() with functions can_node_host_ip() and
can_node_takeover_ip(). These functions are the only ones that need
to look at NODE_FLAGS_NOIPTAKEOVER and NODE_FLAGS_NOIPHOST. They
can make the decision without looking at any other flags due to
previous setup.
* Remove explicit flag checking in IP allocation functions (including
unassign_unsuitable_ips()) and just call can_node_host_ip() and
can_node_takeover_ip() as appropriate.
* Update test code to handle CTDB_SET_NoIPHostOnAllDisabled.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 1308a51f73f2e29ba4dbebb6111d9309a89732cc)
Diffstat (limited to 'ctdb/server/ctdb_tunables.c')
-rw-r--r-- | ctdb/server/ctdb_tunables.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_tunables.c b/ctdb/server/ctdb_tunables.c index aa3115d37bb..84fb9490070 100644 --- a/ctdb/server/ctdb_tunables.c +++ b/ctdb/server/ctdb_tunables.c @@ -84,7 +84,7 @@ static const struct { { "DBRecordSizeWarn", 10000000, offsetof(struct ctdb_tunable, db_record_size_warn), false }, { "DBSizeWarn", 100000000, offsetof(struct ctdb_tunable, db_size_warn), false }, { "PullDBPreallocation", 10*1024*1024, offsetof(struct ctdb_tunable, pulldb_preallocation_size), false }, - { "NoIPTakeoverOnDisabled", 0, offsetof(struct ctdb_tunable, no_ip_takeover_on_disabled), false }, + { "NoIPHostOnAllDisabled", 0, offsetof(struct ctdb_tunable, no_ip_host_on_all_disabled), false }, { "DeadlockTimeout", 300, offsetof(struct ctdb_tunable, deadlock_timeout), false }, { "Samba3AvoidDeadlocks", 0, offsetof(struct ctdb_tunable, samba3_hack), false }, }; |