ctdb-daemon: Send broadcast to connected nodes, not configured nodes
authorAmitay Isaacs <amitay@gmail.com>
Thu, 28 Sep 2017 01:47:00 +0000 (11:47 +1000)
committerMartin Schwenke <martins@samba.org>
Thu, 5 Oct 2017 03:19:21 +0000 (05:19 +0200)
https://bugzilla.samba.org/show_bug.cgi?id=13056

Database recovery takes care of attaching missing databases on all the nodes.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/server/ctdb_ltdb_server.c

index d83783854a09a31b10558cbf1a2a9e3d828ffeb5..c199aac2d1dd4747843fade848b56f3025a45192 100644 (file)
@@ -1206,7 +1206,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
        }
 
        /* tell all the other nodes about this database */
-       ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL, 0, opcode,
+       ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_CONNECTED, 0, opcode,
                                 0, CTDB_CTRL_FLAG_NOREPLY,
                                 indata, NULL, NULL);
 
@@ -1260,7 +1260,8 @@ int32_t ctdb_control_db_detach(struct ctdb_context *ctdb, TDB_DATA indata,
                client = reqid_find(ctdb->idr, client_id, struct ctdb_client);
                if (client != NULL) {
                        /* forward the control to all the nodes */
-                       ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL, 0,
+                       ctdb_daemon_send_control(ctdb,
+                                                CTDB_BROADCAST_CONNECTED, 0,
                                                 CTDB_CONTROL_DB_DETACH, 0,
                                                 CTDB_CTRL_FLAG_NOREPLY,
                                                 indata, NULL, NULL);