6 Verify 'ctdb getmonmode' works correctly.
8 This test doesn't actually verify that enabling and disabling
9 monitoring mode actually does that. It trusts ctdb that the
10 monitoring mode is modified as requested. 21_ctdb_disablemonitor.sh
11 does some more useful checking.
15 * An active CTDB cluster with at least 2 active nodes.
19 1. Verify that the status on all of the ctdb nodes is 'OK'.
20 2. Use 'ctdb getmodmode -n <node>' to get the current monitoring mode.
21 3. Verify that it looks sane.
22 4. Verify that the command prints the output in colon-separated format
23 when run with the '-Y' option.
24 5. Disable monitoring on the node using 'ctdb disablemonitor'.
25 6. Verify that it shows monitoring as 'disabled'.
29 * 'ctdb getmonmode' works as expected.
33 . ctdb_test_functions.bash
42 ctdb_restart_when_done
46 try_command_on_node -v 0 $CTDB getmonmode -n $test_node
50 '^Monitoring mode:(ACTIVE \(0\)|DISABLED \(1\))$' \
53 try_command_on_node -v 0 $CTDB -Y getmonmode -n $test_node
55 sanity_check_output 2 '^(:mode:|:0:|:1:)$' "$out"
57 try_command_on_node -v 0 $CTDB disablemonitor -n $test_node
59 wait_until_node_has_status $test_node monoff