1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-07 00:58:40 +03:00

ctdb-config: Integrate failover options into conf-tool

Update and add tests accordingly.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit d003a41a9cb9ea97a7da9dbb5bd3138f82da6cf1)
This commit is contained in:
Martin Schwenke 2018-08-21 11:44:03 +10:00 committed by Karolin Seeger
parent f518865e97
commit 83b79f5bfb
4 changed files with 29 additions and 0 deletions

View File

@ -32,6 +32,7 @@
#include "cluster/cluster_conf.h"
#include "database/database_conf.h"
#include "event/event_conf.h"
#include "failover/failover_conf.h"
#include "server/legacy_conf.h"
#include "common/conf_tool.h"
@ -243,6 +244,7 @@ int conf_tool_run(struct conf_tool_context *ctx, int *result)
cluster_conf_init(ctx->conf);
database_conf_init(ctx->conf);
event_conf_init(ctx->conf);
failover_conf_init(ctx->conf);
legacy_conf_init(ctx->conf);
if (! conf_valid(ctx->conf)) {

View File

@ -43,6 +43,8 @@ ok <<EOF
# tdb mutexes = true
[event]
# debug script =
[failover]
# disabled = false
[legacy]
# realtime scheduling = true
# recmaster capability = true

View File

@ -0,0 +1,24 @@
#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
PATH="$PATH:$CTDB_SCRIPTS_HELPER_BINDIR"
setup_ctdb_base "${TEST_VAR_DIR}" "cunit"
conffile="${CTDB_BASE}/ctdb.conf"
remove_files ()
{
rm -f "$conffile"
}
test_cleanup remove_files
cat > "$conffile" <<EOF
EOF
ok <<EOF
false
EOF
unit_test ctdb-config get "failover" "disabled"

View File

@ -511,6 +511,7 @@ def build(bld):
ctdb-event-conf
ctdb-cluster-conf
ctdb-database-conf
ctdb-failover-conf
ctdb-legacy-conf
ctdb-util samba-util talloc replace popt''',
install_path='${CTDB_HELPER_BINDIR}')