1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00
samba-mirror/ctdb/tests/simple/00_ctdb_init.sh
Martin Schwenke 0d425a07d4 Separate test cleanup code in output and clean up ctdb restart code.
* ctdb_restart_when_done() now schedules a restart by setting an
  explicit variable that is respected in ctdb_test_exit(), rather than
  adding a restart to $ctdb_test_exit_hook.  This means that restarts
  are all done in one place.

* ctdb_test_exit() turns off "set -e" to make sure that all cleanup
  happens.

* ctdb_test_exit() now prints a clear message indicating where the
  test ends and the cleanup begins.  This message also includes the
  return code of the test.

* Add debug in cluster_is_healthy to try to capture information about
  unexpected unhealthiness when a test starts.

* Simplify simple/07_ctdb_process_exists.sh so that the exit code is
  generated more obviously.

* Remove redundant calls to ctdb_test_exit at the end of tests, since
  they're done automatically via a trap.  Also remove any preceding
  warnings of restarts or final hints about test success/failure.

* Allow multi-digit debug levels in simple/12_ctdb_getdebug.sh and
  simple/13_ctdb_setdebug.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit b6fa044a1364cbb3008085041453ee4885f7ced1)
2009-07-03 17:40:16 +10:00

33 lines
482 B
Bash
Executable File

#!/bin/bash
test_info()
{
cat <<EOF
Restart the ctdbd daemons of a CTDB cluster.
No error if ctdbd is not already running on the cluster.
Prerequisites:
* Nodes must be accessible via 'onnode'.
Steps:
1. Restart the ctdb daemons on all nodes using a method according to
the test environment and platform.
Expected results:
* The cluster is healthy within a reasonable timeframe.
EOF
}
. ctdb_test_functions.bash
ctdb_test_init "$@"
set -e
setup_ctdb
restart_ctdb