summaryrefslogtreecommitdiffstats
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2013-11-22 13:57:03 +1100
committerMichael Adam <obnox@samba.org>2013-11-27 18:46:16 +0100
commit44a0466ac1c69fe9f0734a6225c1a1a38e48299a (patch)
tree2b7468e14f091690b378af4bf5771b7442898b60 /ctdb
parenta6dbe126f5adb9368143da731a623ce4c61c0203 (diff)
downloadsamba-44a0466ac1c69fe9f0734a6225c1a1a38e48299a.tar.gz
samba-44a0466ac1c69fe9f0734a6225c1a1a38e48299a.tar.xz
samba-44a0466ac1c69fe9f0734a6225c1a1a38e48299a.zip
ctdb-recoverd: Only respond to currently queued ipreallocated requests
Otherwise new requests can come in during the latter parts of the takeover run when the IP allocation algorithm has already run, and the new requests will be dequeued even though they haven't really be processed. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_recoverd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index 70ed87e355a..c5cd36cfa92 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -2606,9 +2606,18 @@ static void process_ipreallocate_requests(struct ctdb_context *ctdb,
TDB_DATA result;
int32_t ret;
uint32_t culprit;
+ struct srvid_requests *current;
DEBUG(DEBUG_INFO, ("recovery master forced ip reallocation\n"));
+ /* Only process requests that are currently pending. More
+ * might come in while the takeover run is in progress and
+ * they will need to be processed later since they might
+ * be in response flag changes.
+ */
+ current = rec->reallocate_requests;
+ rec->reallocate_requests = NULL;
+
/* update the list of public ips that a node can handle for
all connected nodes
*/
@@ -2629,7 +2638,7 @@ static void process_ipreallocate_requests(struct ctdb_context *ctdb,
result.dsize = sizeof(int32_t);
result.dptr = (uint8_t *)&ret;
- srvid_requests_reply(ctdb, &rec->reallocate_requests, result);
+ srvid_requests_reply(ctdb, &current, result);
}