]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
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)
committerKarolin Seeger <kseeger@samba.org>
Wed, 25 Oct 2017 06:43:02 +0000 (08:43 +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>
(cherry picked from commit 70d306373e80eafe3a356c60a823a2577001d7d1)

ctdb/server/ctdb_ltdb_server.c

index 8ff963419f15197fd0236d6bedad26fc40098b23..22a1ee89fd6a7b710322bc94f6e72260502169eb 100644 (file)
@@ -1208,7 +1208,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
        lockdown_memory(ctdb->valgrinding);
 
        /* tell all the other nodes about this database */
-       ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL, tdb_flags,
+       ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_CONNECTED, tdb_flags,
                                 persistent?CTDB_CONTROL_DB_ATTACH_PERSISTENT:
                                                CTDB_CONTROL_DB_ATTACH,
                                 0, CTDB_CTRL_FLAG_NOREPLY,
@@ -1263,7 +1263,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);