1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

ctdb-ipalloc: Document the steps involved in a takeover run

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): Wed Jan 13 23:27:01 CET 2016 on sn-devel-144
This commit is contained in:
Martin Schwenke 2015-12-11 16:07:51 +11:00 committed by Amitay Isaacs
parent e320725f02
commit 39bc356ccb

View File

@ -1729,7 +1729,32 @@ static void takeover_run_fail_callback(struct ctdb_context *ctdb,
} }
/* /*
make any IP alias changes for public addresses that are necessary * Recalculate the allocation of public IPs to nodes and have the
* nodes host their allocated addresses.
*
* - Allocate memory for IP allocation state, including per node
* arrays
* - Populate IP allocation algorithm in IP allocation state
* - Populate local value of tunable NoIPFailback in IP allocation
state - this is really a cluster-wide configuration variable and
only the value form the master node is used
* - Retrieve tunables NoIPTakeover and NoIPHostOnAllDisabled from all
* connected nodes - this is done separately so tunable values can
* be faked in unit testing
* - Populate NoIPTakover tunable in IP allocation state
* - Populate NoIPHost in IP allocation state, derived from node flags
* and NoIPHostOnAllDisabled tunable
* - Retrieve and populate known and available IP lists in IP
* allocation state
* - If no available IP addresses then early exit
* - Build list of (known IPs, currently assigned node)
* - Populate list of nodes to force rebalance - internal structure,
* currently no way to fetch, only used by LCP2 for nodes that have
* had new IP addresses added
* - Run IP allocation algorithm
* - Send RELEASE_IP to all nodes for IPs they should not host
* - Send TAKE_IP to all nodes for IPs they should host
* - Send IPREALLOCATED to all nodes (with backward compatibility hack)
*/ */
int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map_old *nodemap, int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map_old *nodemap,
uint32_t *force_rebalance_nodes, uint32_t *force_rebalance_nodes,