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);
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 */
DEBUG(DEBUG_ERR, (__location__ " Reload nodes file from recovery daemon\n"));
- ctdb_load_nodes_file(rec->ctdb);
+ ctdb_load_nodes(rec->ctdb);
}
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;
}
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;
DBG_ERR(" Out of memory\n");
goto fail;
}
- ctdb_load_nodes_file(ctdb);
+ ctdb_load_nodes(ctdb);
/*
* Database setup/options