diff --git a/ctdb/common/conf_tool.c b/ctdb/common/conf_tool.c index d37f9736376..44994194d72 100644 --- a/ctdb/common/conf_tool.c +++ b/ctdb/common/conf_tool.c @@ -29,6 +29,7 @@ #include "common/path.h" #include "common/logging_conf.h" +#include "cluster/cluster_conf.h" #include "event/event_conf.h" #include "common/conf_tool.h" @@ -237,6 +238,7 @@ int conf_tool_run(struct conf_tool_context *ctx, int *result) /* Call functions to initialize config sections/variables */ logging_conf_init(ctx->conf, NULL); + cluster_conf_init(ctx->conf); event_conf_init(ctx->conf); if (! conf_valid(ctx->conf)) { diff --git a/ctdb/tests/cunit/config_test_001.sh b/ctdb/tests/cunit/config_test_001.sh index 8387f7df5cc..f24b2326b0f 100755 --- a/ctdb/tests/cunit/config_test_001.sh +++ b/ctdb/tests/cunit/config_test_001.sh @@ -22,6 +22,10 @@ ok < "$conffile" < "$conffile" < transport = invalid +conf: validation for option "transport" failed +Failed to load config file $conffile +EOF +unit_test ctdb-config validate + +cat > "$conffile" < "$conffile" < "$conffile" < node address = 10.1.2.3:123 +conf: validation for option "node address" failed +Failed to load config file $conffile +EOF +unit_test ctdb-config validate diff --git a/ctdb/wscript b/ctdb/wscript index 184fc549ba1..82d238cd94b 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -477,6 +477,7 @@ def build(bld): cflags='-DCTDB_CONF_TOOL', deps='''ctdb-logging-conf ctdb-event-conf + ctdb-cluster-conf ctdb-util samba-util talloc replace popt''', install_path='${CTDB_HELPER_BINDIR}')