summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-11-20 15:37:39 +1100
committerMartin Schwenke <martins@samba.org>2017-11-30 11:34:20 +0100
commit73e261b48c4abc91e00775ac7437752c9640e5bd (patch)
treece972c278f26e9ff9db121b42ed74ac949ef5539 /ctdb
parent2b253f6b1bc4e765f3fcb614a3b67b14084a625d (diff)
downloadsamba-73e261b48c4abc91e00775ac7437752c9640e5bd.tar.gz
ctdb-takeover: Send tcp tickles immediately on STARTUP control
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13154 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_takeover.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index 22dd878818d..cd240875ba2 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -1483,24 +1483,23 @@ int32_t ctdb_control_tcp_remove(struct ctdb_context *ctdb, TDB_DATA indata)
}
+static void ctdb_send_set_tcp_tickles_for_all(struct ctdb_context *ctdb,
+ bool force);
+
/*
Called when another daemon starts - causes all tickles for all
public addresses we are serving to be sent to the new node on the
- next check. This actually causes the next scheduled call to
- tdb_update_tcp_tickles() to update all nodes. This is simple and
+ next check. This actually causes the tickles to be sent to the
+ other node immediately. In case there is an error, the periodic
+ timer will send the updates on timer event. This is simple and
doesn't require careful error handling.
*/
int32_t ctdb_control_startup(struct ctdb_context *ctdb, uint32_t pnn)
{
- struct ctdb_vnn *vnn;
-
DEBUG(DEBUG_INFO, ("Received startup control from node %lu\n",
(unsigned long) pnn));
- for (vnn = ctdb->vnn; vnn != NULL; vnn = vnn->next) {
- vnn->tcp_update_needed = true;
- }
-
+ ctdb_send_set_tcp_tickles_for_all(ctdb, true);
return 0;
}