There won't be an IP tree. It is only ever initialised during a
takeover run.
The alternate to this would be to avoid sending
CTDB_SRVID_RECD_UPDATE_IP in "ctdb moveip". This logic is probably
best kept out of the CLI tool.
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
int update_ip_assignment_tree(struct ctdb_context *ctdb, struct ctdb_public_ip *ip)
{
- struct ctdb_public_ip_list *tmp_ip;
+ struct ctdb_public_ip_list *tmp_ip;
+
+ /* IP tree is never built if DisableIPFailover is set */
+ if (ctdb->tunable.disable_ip_failover != 0) {
+ return 0;
+ }
if (ctdb->ip_tree == NULL) {
DEBUG(DEBUG_ERR,("No ctdb->ip_tree yet. Failed to update ip assignment\n"));