1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/ctdb/tests/eventscripts/40.vsftpd.monitor.002.sh
Martin Schwenke 26b7841aa6 ctdb-scripts: Simplify TCP port checking
Commit 86792724a2 added complications on
top of the multiple TCP port checking methods that used to exist.
Life is simpler now and the cause of any failures is obvious.  So just
print a simple message if the port check fails.

Tweak tests to match changes.  Drop one test that becomes a duplicate.

Temporarily tweak ctdb_check_command() so that it passes shellcheck
tests.  It will be removed anyway in a subsequent commit.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-01-16 11:57:08 +01:00

21 lines
430 B
Bash
Executable File

#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
define_test "managed, down - once, twice"
setup_vsftpd "down"
export CTDB_MANAGES_VSFTPD="yes"
ok <<EOF
vsftpd not listening on TCP port 21
WARNING: vsftpd not listening but less than 2 consecutive failures, not unhealthy yet
EOF
simple_test
required_result 1 <<EOF
vsftpd not listening on TCP port 21
ERROR: 2 consecutive failures for vsftpd, marking node unhealthy
EOF
simple_test