From fcda17cb42f3384c62d81903e364e8ddb4ce217d Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 17 Apr 2018 22:15:41 +1000 Subject: [PATCH] ctdb-tools: Add logging config options to config tool Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Sat May 12 15:01:32 CEST 2018 on sn-devel-144 --- ctdb/common/conf_tool.c | 3 ++ ctdb/tests/cunit/config_test_001.sh | 6 +++ ctdb/tests/cunit/config_test_002.sh | 65 +++++++++++++++++++++++++++++ ctdb/wscript | 3 +- 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100755 ctdb/tests/cunit/config_test_002.sh diff --git a/ctdb/common/conf_tool.c b/ctdb/common/conf_tool.c index 108cf67b651..1ee4b027de7 100644 --- a/ctdb/common/conf_tool.c +++ b/ctdb/common/conf_tool.c @@ -28,6 +28,8 @@ #include "common/conf.h" #include "common/path.h" +#include "common/logging_conf.h" + #include "common/conf_tool.h" struct conf_tool_context { @@ -233,6 +235,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); if (! conf_valid(ctx->conf)) { D_ERR("Failed to define configuration options\n"); diff --git a/ctdb/tests/cunit/config_test_001.sh b/ctdb/tests/cunit/config_test_001.sh index 6c95c05f0b8..084f1a3b29d 100755 --- a/ctdb/tests/cunit/config_test_001.sh +++ b/ctdb/tests/cunit/config_test_001.sh @@ -15,7 +15,13 @@ remove_files () test_cleanup remove_files +# Get the default values that are dependent on install prefix +logging_location=$(ctdb-config get "logging" "location") + ok < "$conffile" < "$conffile" < "$conffile" < "$conffile" <