mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
add a new tunable 'NoIPFailback'
when this tunable is set, ip addresses will only be failed over when a node fails. And only those ip addresses held by the failed node will be reallocated in the cluster. When a node becomes active again, this will not lead to any failback of ip addresses. This can reduce the number of "ip address movements" in the cluster since we dont automatically fail an ip address back, but can also lead to an unbalanced cluster since we no longer attempt to spread the ip addresses out evenly across the active nodes. This tuneable can NOT be active at the same time as DeterministicIPs are used. (This used to be ctdb commit d3b8a461b15bc584fa1785eb5922de6d49d8f6c4)
This commit is contained in:
parent
e08519b74d
commit
a89ed0fdc2
@ -91,6 +91,7 @@ struct ctdb_tunable {
|
||||
uint32_t deterministic_public_ips;
|
||||
uint32_t disable_when_unhealthy;
|
||||
uint32_t reclock_ping_period;
|
||||
uint32_t no_ip_failback;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -736,6 +736,18 @@ try_again:
|
||||
}
|
||||
}
|
||||
|
||||
/* If we dont want ips to fail back after a node becomes healthy
|
||||
again, we wont even try to reallocat the ip addresses so that
|
||||
they are evenly spread out.
|
||||
This can NOT be used at the same time as DeterministicIPs !
|
||||
*/
|
||||
if (1 == ctdb->tunable.no_ip_failback) {
|
||||
if (1 == ctdb->tunable.deterministic_public_ips) {
|
||||
DEBUG(DEBUG_ERR, ("ERROR: You can not use 'DeterministicIPs' and 'NoIPFailback' at the same time\n"));
|
||||
}
|
||||
goto finished;
|
||||
}
|
||||
|
||||
|
||||
/* now, try to make sure the ip adresses are evenly distributed
|
||||
across the node.
|
||||
@ -821,6 +833,10 @@ try_again:
|
||||
}
|
||||
|
||||
|
||||
/* finished distributing the public addresses, now just send the
|
||||
info out to the nodes
|
||||
*/
|
||||
finished:
|
||||
|
||||
/* at this point ->pnn is the node which will own each IP
|
||||
or -1 if there is no node that can cover this ip
|
||||
|
@ -46,7 +46,8 @@ static const struct {
|
||||
{ "EnableBans", 1, offsetof(struct ctdb_tunable, enable_bans) },
|
||||
{ "DeterministicIPs", 1, offsetof(struct ctdb_tunable, deterministic_public_ips) },
|
||||
{ "DisableWhenUnhealthy", 0, offsetof(struct ctdb_tunable, disable_when_unhealthy) },
|
||||
{ "ReclockPingPeriod", 60, offsetof(struct ctdb_tunable, reclock_ping_period) },
|
||||
{ "ReclockPingPeriod", 60, offsetof(struct ctdb_tunable, reclock_ping_period) },
|
||||
{ "NoIPFailback", 0, offsetof(struct ctdb_tunable, no_ip_failback) },
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user