Revert "recoverd: Disable takeover runs on other nodes for 5 minutes"
[ctdb.git] / server / ctdb_recoverd.c
index 381e998fb6b143034ec66626ebc45f35de8a0b6b..e5c2887f44f37a78cc7b88b1ba6be357b7d3dd80 100644 (file)
@@ -1481,15 +1481,6 @@ static int recover_database(struct ctdb_recoverd *rec,
        return 0;
 }
 
-/*
-  reload the nodes file 
-*/
-static void reload_nodes_file(struct ctdb_context *ctdb)
-{
-       ctdb->nodes = NULL;
-       ctdb_load_nodes_file(ctdb);
-}
-
 static int ctdb_reload_remote_public_ips(struct ctdb_context *ctdb,
                                         struct ctdb_recoverd *rec,
                                         struct ctdb_node_map *nodemap,
@@ -1700,10 +1691,10 @@ static bool do_takeover_run(struct ctdb_recoverd *rec,
 
        nodes = list_of_connected_nodes(rec->ctdb, nodemap, rec, false);
 
-       /* Disable for 5 minutes.  This can be a tunable later if
+       /* Disable for 60 seconds.  This can be a tunable later if
         * necessary.
         */
-       dtr.data = 300;
+       dtr.data = 60;
        for (i = 0; i < talloc_array_length(nodes); i++) {
                if (ctdb_client_send_message(rec->ctdb, nodes[i],
                                             CTDB_SRVID_DISABLE_TAKEOVER_RUNS,
@@ -2364,7 +2355,7 @@ static void reload_nodes_handler(struct ctdb_context *ctdb, uint64_t srvid,
 
        DEBUG(DEBUG_ERR, (__location__ " Reload nodes file from recovery daemon\n"));
 
-       reload_nodes_file(rec->ctdb);
+       ctdb_load_nodes_file(rec->ctdb);
 }
 
 
@@ -3797,7 +3788,7 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
 
        if (ctdb->num_nodes != nodemap->num) {
                DEBUG(DEBUG_ERR, (__location__ " ctdb->num_nodes (%d) != nodemap->num (%d) reloading nodes file\n", ctdb->num_nodes, nodemap->num));
-               reload_nodes_file(ctdb);
+               ctdb_load_nodes_file(ctdb);
                return;
        }