summaryrefslogtreecommitdiff
path: root/ctdb/server/ipalloc.h
AgeCommit message (Collapse)AuthorFilesLines
2018-07-11ctdb-daemon: Drop the noiphost "node flags" bitmapMartin Schwenke1-3/+0
This is no longer needed because inactive/disabled nodes no longer report any available public IP addresses. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-07-11ctdb-daemon: Drop plumbing for obsolete tunable NoIPHostOnAllDisabledMartin Schwenke1-1/+0
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-02-24ctdb-ipalloc: Add per-IP known_on bitmapMartin Schwenke1-0/+1
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-02-24ctdb-ipalloc: Switch available_on to struct bitmapMartin Schwenke1-1/+3
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-12-19ctdb-takeover: NoIPHostOnAllDisabled is global across clusterMartin Schwenke1-2/+2
Instead of gathering the value from all nodes, just use the value on the recovery master and have it affect all nodes. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-12-19ctdb-takeover: NoIPTakeover is global across clusterMartin Schwenke1-1/+1
Instead of gathering the value from all nodes, just use the value on the recovery master and have it affect all nodes. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-12-02ctdb-ipalloc: Optimise check to see if IP is available on a nodeMartin Schwenke1-0/+1
Use a "bitmap" of available IPs for each IP address instead of walking the list of available IP addresses. For ctdb/tests/takeover/lcp2.030.sh, this improves the time taken on my laptop from: real 0m11.997s user 0m11.960s sys 0m0.000s to real 0m8.571s user 0m8.544s sys 0m0.000s So, when assigning all 900 IP addresses the improvement is about 25%. For the no-op case (where all IPs are already assigned to nodes), the extra setup adds a small fraction of a second for 900 IPs. Intermediate cases result in intermediate improvements. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-14ctdb-ipalloc: ipalloc_set_public_ips() can't failMartin Schwenke1-1/+1
So make it a void function. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-04ctdb-ipalloc: IP allocation state is now an opaque structureMartin Schwenke1-13/+1
It is private to the IP allocation module. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-04ctdb-ipalloc: ipalloc() returns public IP listMartin Schwenke1-1/+1
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-04ctdb-ipalloc: Move set_ipflags_internal() to ipallocMartin Schwenke1-0/+5
Rename it ipalloc_set_node_flags(). Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-04ctdb-ipalloc: Move ipalloc state initialisation to ipalloc.cMartin Schwenke1-0/+8
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-04ctdb-ipalloc: Make no_ip_failback a booleanMartin Schwenke1-1/+1
No need to expose tunable values that far down. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-04ctdb-ipalloc: New function ipalloc_can_host_ips()Martin Schwenke1-0/+2
Abstracts out code involving internals of IP allocation state. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-04ctdb-ipalloc: Drop known public IPs from IP allocation stateMartin Schwenke1-1/+0
This is never used in the allocation algorithms. It is only used when building the merged IP list. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-04ctdb-ipalloc: New function ipalloc_set_public_ips()Martin Schwenke1-0/+4
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-02-12ctdb-ipalloc: Remove most uses of struct ctdb_public_ip_list_oldMartin Schwenke1-4/+2
Where possible, this should no longer be used. struct ctdb_public_ip_list is a fixed size structure and introduces an extra level of indirection. This means one level of indirection can be dropped for known_public_ips and available_public_ips. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Feb 12 08:40:21 CET 2016 on sn-devel-144
2016-01-13ctdb-ipalloc: Split IP allocation into its own build subsystemMartin Schwenke1-0/+63
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>