1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-server: rename ctdb_load_nodes_file to ctdb_load_nodes

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>
This commit is contained in:
John Mulligan 2024-06-06 13:53:43 -04:00 committed by Martin Schwenke
parent 7e7cb91806
commit a0e8304ccf
5 changed files with 7 additions and 7 deletions

View 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);

View 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 */

View 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;
}

View 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;

View 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