ctdb-daemon: Move release of all IPs to startup
authorMartin Schwenke <martin@meltin.net>
Fri, 8 May 2015 10:00:35 +0000 (20:00 +1000)
committerAmitay Isaacs <amitay@samba.org>
Wed, 13 May 2015 04:42:13 +0000 (06:42 +0200)
This means that DisableIPFailover will be set if it should be.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_daemon.c
ctdb/server/ctdb_monitor.c

index fa54d3da5bc60a6ccca1fd208729d1b550468041..dada0a4f1614fdcbd29dd9a5bc6181d248410ef7 100644 (file)
@@ -1334,9 +1334,6 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork)
        }
        tevent_fd_set_auto_close(fde);
 
-       /* release any IPs we hold from previous runs of the daemon */
-       ctdb_release_all_ips(ctdb);
-
        /* Start the transport */
        if (ctdb->methods->start(ctdb) != 0) {
                DEBUG(DEBUG_ALERT,("transport failed to start!\n"));
index c502f0e40e510d7e00d331755e813e6a4742c5ed..6dd7c1e637a321b1c6b80810d4d9130e1cee20cb 100644 (file)
@@ -247,6 +247,9 @@ static void ctdb_run_startup(struct event_context *ev, struct timed_event *te,
                return;
        }
 
+       /* release any IPs we hold from previous runs of the daemon */
+       ctdb_release_all_ips(ctdb);
+
        DEBUG(DEBUG_NOTICE,("Running the \"startup\" event.\n"));
        ret = ctdb_event_script_callback(ctdb,
                                         ctdb->monitor->monitor_context,