summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-11-20 15:27:52 +1100
committerMartin Schwenke <martins@samba.org>2017-11-30 15:29:48 +0100
commitd7a5cd589b7b16d625dbc64dac21a1384519e32b (patch)
tree8590b5e342ca6ee160ad97ac9f448e432e9608bd /ctdb
parent73e261b48c4abc91e00775ac7437752c9640e5bd (diff)
downloadsamba-d7a5cd589b7b16d625dbc64dac21a1384519e32b.tar.gz
ctdb-daemon: Send STARTUP control after startup event
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13154 STARTUP control is primarily used to synchronise tcp tickles from running nodes to a node which has just started up. Earlier STARTUP control was sent (using BROADCAST_ALL) after setup event. Once the other nodes in the cluster connected to this node, the queued up messages would be sent and the tcp tickles would get synchronised. Recent fix to drop messages to disconnected or not-yet-connected nodes, the STARTUP control was never sent to the remote nodes and the tcp tickles did not get synchronised. To fix this problem send the STARTUP control (using BROADCAST_CONNECTED) after startup event. By this time all the running nodes in the cluster are connected. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu Nov 30 15:29:48 CET 2017 on sn-devel-144
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_daemon.c6
-rw-r--r--ctdb/server/ctdb_monitor.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index aa2c92ed221..459dd2932ee 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -1088,12 +1088,6 @@ static void ctdb_setup_event_callback(struct ctdb_context *ctdb, int status,
}
ctdb_run_notification_script(ctdb, "setup");
- /* tell all other nodes we've just started up */
- ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL,
- 0, CTDB_CONTROL_STARTUP, 0,
- CTDB_CTRL_FLAG_NOREPLY,
- tdb_null, NULL, NULL);
-
/* Start the recovery daemon */
if (ctdb_start_recoverd(ctdb) != 0) {
DEBUG(DEBUG_ALERT,("Failed to start recovery daemon\n"));
diff --git a/ctdb/server/ctdb_monitor.c b/ctdb/server/ctdb_monitor.c
index 2ecbbb393c0..0a77665ec25 100644
--- a/ctdb/server/ctdb_monitor.c
+++ b/ctdb/server/ctdb_monitor.c
@@ -240,6 +240,12 @@ static void ctdb_startup_callback(struct ctdb_context *ctdb, int status, void *p
ctdb->monitor->next_interval = 2;
ctdb_run_notification_script(ctdb, "startup");
+ /* tell all other nodes we've just started up */
+ ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_CONNECTED,
+ 0, CTDB_CONTROL_STARTUP, 0,
+ CTDB_CTRL_FLAG_NOREPLY,
+ tdb_null, NULL, NULL);
+
tevent_add_timer(ctdb->ev, ctdb->monitor->monitor_context,
timeval_current_ofs(ctdb->monitor->next_interval, 0),
ctdb_check_health, ctdb);