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:
parent
f518865e97
commit
83b79f5bfb
@ -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)) {
|
||||
|
@ -43,6 +43,8 @@ ok <<EOF
|
||||
# tdb mutexes = true
|
||||
[event]
|
||||
# debug script =
|
||||
[failover]
|
||||
# disabled = false
|
||||
[legacy]
|
||||
# realtime scheduling = true
|
||||
# recmaster capability = true
|
||||
|
24
ctdb/tests/cunit/config_test_007.sh
Executable file
24
ctdb/tests/cunit/config_test_007.sh
Executable 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"
|
@ -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}')
|
||||
|
Loading…
x
Reference in New Issue
Block a user