ctdb-client: Only get capabilities from active nodes
authorMartin Schwenke <martin@meltin.net>
Mon, 7 Dec 2015 04:50:23 +0000 (15:50 +1100)
committerMartin Schwenke <martins@samba.org>
Sun, 13 Dec 2015 02:17:10 +0000 (03:17 +0100)
This is used by the recovery daemon to validate the current recovery
master.  Don't risk being unable to elect a new master if the current
master is inactive but unresponsive.

Note that this client call is currently not used by any other callers.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sun Dec 13 03:17:10 CET 2015 on sn-devel-104

ctdb/client/ctdb_client.c

index b9f9cf9677584503d443475c5b2807f176edef65..6615730b93e8138c329f87027d3183f8486815a3 100644 (file)
@@ -3777,7 +3777,7 @@ ctdb_get_capabilities(struct ctdb_context *ctdb,
        uint32_t i, res;
        struct ctdb_node_capabilities *ret;
 
-       nodes = list_of_connected_nodes(ctdb, nodemap, mem_ctx, true);
+       nodes = list_of_active_nodes(ctdb, nodemap, mem_ctx, true);
 
        ret = talloc_array(mem_ctx, struct ctdb_node_capabilities,
                           nodemap->num);