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)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 14 Sep 2010 05:48:37 +0000 (15:48 +1000)
metze

server/ctdb_recoverd.c

index 437e4cb..4df6ce0 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);