From dc65e7082d6027822f66ea067ae62b124bf0834a Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Thu, 6 Jun 2024 10:00:10 -0400 Subject: [PATCH] ctdb-server: use the new "nodes list" configuration option Use the new "nodes list" configuration option. Executing the given path if the path is prefixed by a `!`. The use case is to decouple the nodes file from the shared storage, especially in the case where the shared storage is provided by a vfs module. For an example, imagine a script that runs `curl` on a URL for a highly-available web server where the URL provides the content of the nodes file. Signed-off-by: John Mulligan Reviewed-by: Martin Schwenke --- ctdb/server/ctdbd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c index 67311c6a5da..42695fff444 100644 --- a/ctdb/server/ctdbd.c +++ b/ctdb/server/ctdbd.c @@ -42,6 +42,7 @@ #include "common/logging.h" #include "conf/logging_conf.h" +#include "conf/cluster_conf.h" #include "conf/ctdb_config.h" int script_log_level; @@ -303,7 +304,7 @@ int main(int argc, const char *argv[]) } /* tell ctdb what nodes are available */ - ctdb->nodes_file = talloc_asprintf(ctdb, "%s/nodes", ctdb_base); + ctdb->nodes_file = cluster_conf_nodes_list(ctdb, conf); if (ctdb->nodes_file == NULL) { DBG_ERR(" Out of memory\n"); goto fail; -- 2.47.3