]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-server: rename nodes_file field to nodes_source
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 6 Jun 2024 17:50:02 +0000 (13:50 -0400)
committerMartin Schwenke <martins@samba.org>
Tue, 6 Aug 2024 00:43:36 +0000 (00:43 +0000)
Rename the `struct ctdb_context` field nodes_file to nodes_source to
better match that the field may indicate something other than a true
file.

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

index cee95792ead462ee6f24cfae1e8a12520c683d00..b731724ae0c9f47ca2180b43e5d81533f1eab1a2 100644 (file)
@@ -328,7 +328,7 @@ struct ctdb_context {
 
        struct ctdb_reloadips_handle *reload_ips;
 
-       const char *nodes_file;
+       const char *nodes_source;
        const char *public_addresses_file;
        struct trbt_tree *child_processes; 
 
index 97dfc80ffd1da2f16af4c15c66b15910721c62b5..287a76c77c3add4b3cff35b4a677dea5469d4cdf 100644 (file)
@@ -2193,7 +2193,7 @@ int ctdb_control_getnodesfile(struct ctdb_context *ctdb,
 
        CHECK_CONTROL_DATA_SIZE(0);
 
-       node_map = ctdb_read_nodes(ctdb, ctdb->nodes_file);
+       node_map = ctdb_read_nodes(ctdb, ctdb->nodes_source);
        if (node_map == NULL) {
                D_ERR("Failed to read nodes file\n");
                return -1;
index b7a33af7ecf23174e9746b2633b54a19cab2ebb1..dbb7972e8900a2726d3f5fb0f23fba40d8fcc817 100644 (file)
@@ -127,7 +127,7 @@ void ctdb_load_nodes_file(struct ctdb_context *ctdb)
        struct ctdb_node_map *node_map;
        int ret;
 
-       node_map = ctdb_read_nodes(ctdb, ctdb->nodes_file);
+       node_map = ctdb_read_nodes(ctdb, ctdb->nodes_source);
        if (node_map == NULL) {
                goto fail;
        }
@@ -143,8 +143,8 @@ void ctdb_load_nodes_file(struct ctdb_context *ctdb)
        return;
 
 fail:
-       DEBUG(DEBUG_ERR, ("Failed to load nodes file \"%s\"\n",
-                         ctdb->nodes_file));
+       DEBUG(DEBUG_ERR, ("Failed to load nodes \"%s\"\n",
+                         ctdb->nodes_source));
        talloc_free(node_map);
        exit(1);
 }
index 42695fff444b4367e71e96f352c7bbe6dab5d49e..b8af340d843835bd6362118818ff22ea8e3c7567 100644 (file)
@@ -304,8 +304,8 @@ int main(int argc, const char *argv[])
        }
 
        /* tell ctdb what nodes are available */
-       ctdb->nodes_file = cluster_conf_nodes_list(ctdb, conf);
-       if (ctdb->nodes_file == NULL) {
+       ctdb->nodes_source = cluster_conf_nodes_list(ctdb, conf);
+       if (ctdb->nodes_source == NULL) {
                DBG_ERR(" Out of memory\n");
                goto fail;
        }