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)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 2 Jul 2013 07:41:54 +0000 (17:41 +1000)
metze
(cherry picked from commit 93df096773c89f21f77b3bcf9aa90bf28881b852)

server/ctdb_recoverd.c

index d7a79fed7eb4910a11b8f9a316efccf148bbc801..436b496e8235c201449c9c68648dfb2a8099aba8 100644 (file)
@@ -3218,10 +3218,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"));
@@ -3408,6 +3404,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);