mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +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 "cluster/cluster_conf.h"
|
||||||
#include "database/database_conf.h"
|
#include "database/database_conf.h"
|
||||||
#include "event/event_conf.h"
|
#include "event/event_conf.h"
|
||||||
|
#include "failover/failover_conf.h"
|
||||||
#include "server/legacy_conf.h"
|
#include "server/legacy_conf.h"
|
||||||
|
|
||||||
#include "common/conf_tool.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);
|
cluster_conf_init(ctx->conf);
|
||||||
database_conf_init(ctx->conf);
|
database_conf_init(ctx->conf);
|
||||||
event_conf_init(ctx->conf);
|
event_conf_init(ctx->conf);
|
||||||
|
failover_conf_init(ctx->conf);
|
||||||
legacy_conf_init(ctx->conf);
|
legacy_conf_init(ctx->conf);
|
||||||
|
|
||||||
if (! conf_valid(ctx->conf)) {
|
if (! conf_valid(ctx->conf)) {
|
||||||
|
@ -43,6 +43,8 @@ ok <<EOF
|
|||||||
# tdb mutexes = true
|
# tdb mutexes = true
|
||||||
[event]
|
[event]
|
||||||
# debug script =
|
# debug script =
|
||||||
|
[failover]
|
||||||
|
# disabled = false
|
||||||
[legacy]
|
[legacy]
|
||||||
# realtime scheduling = true
|
# realtime scheduling = true
|
||||||
# recmaster capability = 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-event-conf
|
||||||
ctdb-cluster-conf
|
ctdb-cluster-conf
|
||||||
ctdb-database-conf
|
ctdb-database-conf
|
||||||
|
ctdb-failover-conf
|
||||||
ctdb-legacy-conf
|
ctdb-legacy-conf
|
||||||
ctdb-util samba-util talloc replace popt''',
|
ctdb-util samba-util talloc replace popt''',
|
||||||
install_path='${CTDB_HELPER_BINDIR}')
|
install_path='${CTDB_HELPER_BINDIR}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user