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

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 <jmulligan@redhat.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
John Mulligan 2024-06-06 10:00:10 -04:00 committed by Martin Schwenke
parent 315890e845
commit dc65e7082d

View File

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