mirror of
https://github.com/samba-team/samba.git
synced 2025-01-06 13:18:07 +03:00
45da2281aa
These functions are intended to be used in ctdbd, the ctdb tool and fake_ctdbd, replacing the different copies in each place. ctdb_read_nodes() will replace ctdb_read_nodes_file(). The name change is intentional - in future the location may be something other than a simple filename. The static copies of ctdb_read_nodes_file() and node_map_add() are slightly sanitised versions of those in tools/ctdb.c, with a call to ctdb_parse_node_address(). A bit more care is taken in node_map_add() to avoid undefined behaviour if talloc_realloc() fails. ctdb_parse_node_address() will replace ctdb_parse_address(). There is an obvious argument change, since the ctdb context argument was unused. It can only fail on an invalid node address, so return a bool. This function might be changed later to allow the input address string to include an optional port. Where to put this module isn't entirely clear. It could go in common, so be part of ctdb-util. However, if it later needs ctdb-conf (e.g. to allow the node list location to be configurable) then there would be a direct cyclic dependency. This is configuration handling, so conf/ seems sane. However, I didn't want to put it into the ctdb-conf target, since some code might need to parse a nodes list but not need to parse ctdb.conf. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Anoop C S <anoopcs@samba.org> |
||
---|---|---|
.. | ||
cluster_conf.c | ||
cluster_conf.h | ||
conf_tool.c | ||
conf_tool.h | ||
conf.c | ||
conf.h | ||
ctdb_config.c | ||
ctdb_config.h | ||
database_conf.c | ||
database_conf.h | ||
event_conf.c | ||
event_conf.h | ||
failover_conf.c | ||
failover_conf.h | ||
legacy_conf.c | ||
legacy_conf.h | ||
logging_conf.c | ||
logging_conf.h | ||
node.c | ||
node.h |