server/recoverd: do takeover_run after verifying the reclock file
authorStefan Metzmacher <metze@samba.org>
Tue, 31 Aug 2010 06:42:32 +0000 (08:42 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 13 Sep 2010 07:01:41 +0000 (09:01 +0200)
metze

server/ctdb_recoverd.c

index 437e4cb8a436bb0e5930f8dd00f4a899e79e2735..4df6ce0386aec59b30a9824f24f7df7e6a5139fc 100644 (file)
@@ -3009,10 +3009,6 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
                        rec->reallocate_callers = NULL;
                }
        }
-       /* if there are takeovers requested, perform it and notify the waiters */
-       if (rec->reallocate_callers) {
-               process_ipreallocate_requests(ctdb, rec);
-       }
 
        if (rec->recmaster == (uint32_t)-1) {
                DEBUG(DEBUG_NOTICE,(__location__ " Initial recovery master set - forcing election\n"));
@@ -3199,6 +3195,11 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
                }
        }
 
+       /* if there are takeovers requested, perform it and notify the waiters */
+       if (rec->reallocate_callers) {
+               process_ipreallocate_requests(ctdb, rec);
+       }
+
        /* get the nodemap for all active remote nodes
         */
        remote_nodemaps = talloc_array(mem_ctx, struct ctdb_node_map *, nodemap->num);