]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-server: rename ctdb_load_nodes_file to ctdb_load_nodes
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 6 Jun 2024 17:53:43 +0000 (13:53 -0400)
committerMartin Schwenke <martins@samba.org>
Tue, 6 Aug 2024 00:43:36 +0000 (00:43 +0000)
Rename ctdb_load_nodes_file to ctdb_load_nodes as it can now load nodes
from more than a regular file.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/include/ctdb_private.h
ctdb/server/ctdb_recover.c
ctdb/server/ctdb_recoverd.c
ctdb/server/ctdb_server.c
ctdb/server/ctdbd.c

index b731724ae0c9f47ca2180b43e5d81533f1eab1a2..88f775ce1264320b81e6dfb88f150d88454ea691 100644 (file)
@@ -840,7 +840,7 @@ struct ctdb_node *ctdb_ip_to_node(struct ctdb_context *ctdb,
 uint32_t ctdb_ip_to_pnn(struct ctdb_context *ctdb,
                        const ctdb_sock_addr *nodeip);
 
-void ctdb_load_nodes_file(struct ctdb_context *ctdb);
+void ctdb_load_nodes(struct ctdb_context *ctdb);
 
 int ctdb_set_address(struct ctdb_context *ctdb, const char *address);
 
index 7b30d119a3a4a0afad20251e11804ad037e7c14d..5a40618487e6f8e6dd08926d8cf16696b3e0588b 100644 (file)
@@ -158,7 +158,7 @@ ctdb_control_reload_nodes_file(struct ctdb_context *ctdb, uint32_t opcode)
        ctdb->num_nodes = 0;
 
        /* load the new nodes file */
-       ctdb_load_nodes_file(ctdb);
+       ctdb_load_nodes(ctdb);
 
        for (i=0; i<ctdb->num_nodes; i++) {
                /* keep any identical pre-existing nodes and connections */
index 3f71c07d05dea8557fbb7cf4b7c3b3d4a693323e..09d5df3e9cbbdb9303e276a96786a03e7cc12d2d 100644 (file)
@@ -1624,7 +1624,7 @@ static void reload_nodes_handler(uint64_t srvid, TDB_DATA data,
 
        DEBUG(DEBUG_ERR, (__location__ " Reload nodes file from recovery daemon\n"));
 
-       ctdb_load_nodes_file(rec->ctdb);
+       ctdb_load_nodes(rec->ctdb);
 }
 
 
@@ -2677,7 +2677,7 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
 
        if (ctdb->num_nodes != nodemap->num) {
                DEBUG(DEBUG_ERR, (__location__ " ctdb->num_nodes (%d) != nodemap->num (%d) reloading nodes file\n", ctdb->num_nodes, nodemap->num));
-               ctdb_load_nodes_file(ctdb);
+               ctdb_load_nodes(ctdb);
                return;
        }
 
index dbb7972e8900a2726d3f5fb0f23fba40d8fcc817..0e12e8e834d503b3bcc3316d39a4630937e01aea 100644 (file)
@@ -121,8 +121,8 @@ static int convert_node_map_to_list(struct ctdb_context *ctdb,
        return 0;
 }
 
-/* Load the nodes list from a file */
-void ctdb_load_nodes_file(struct ctdb_context *ctdb)
+/* Load the nodes list from a file or sub-processes' stdout  */
+void ctdb_load_nodes(struct ctdb_context *ctdb)
 {
        struct ctdb_node_map *node_map;
        int ret;
index b8af340d843835bd6362118818ff22ea8e3c7567..73c4372f70d207604219677521c5649aee824b83 100644 (file)
@@ -309,7 +309,7 @@ int main(int argc, const char *argv[])
                DBG_ERR(" Out of memory\n");
                goto fail;
        }
-       ctdb_load_nodes_file(ctdb);
+       ctdb_load_nodes(ctdb);
 
        /*
         * Database setup/options