6 Verify that 'ctdb setvar' works correctly.
8 Doesn't strictly follow the procedure outlines below, since it doesn't
9 pick a variable from the output of 'ctdb listvars'. However, it
10 verifies the value with 'ctdb getvar' in addition to 'ctdb listvars'.
14 * An active CTDB cluster with at least 2 active nodes.
18 1. Verify that the status on all of the ctdb nodes is 'OK'.
19 2. Get a list of all the ctdb tunable variables, using the 'ctdb
21 3. Set the value of one of the variables using the 'setvar' control on
22 one of the nodes. E.g. 'ctdb setvar DeterministicIPs 0'.
23 4. Verify that the 'listvars' control now shows the new value for the
28 * After setting a value using 'ctdb setvar', 'ctdb listvars' shows the
29 modified value of the variable.
33 .
"${TEST_SCRIPTS_DIR}/integration.bash"
42 ctdb_restart_when_done
46 try_command_on_node
-v 0 $CTDB getvar
$var
50 echo "Going to try incrementing it..."
54 try_command_on_node
0 $CTDB setvar
$var $incr
56 echo "That seemed to work, let's check the value..."
58 try_command_on_node
-v 0 $CTDB getvar
$var
62 if [ "$incr" != "$newval" ] ; then
63 echo "Nope, that didn't work..."
67 echo "Look's good! Now verifying with \"ctdb listvars\""
68 try_command_on_node
-v 0 "$CTDB listvars | grep '^$var'"
72 if [ "$incr" != "$check" ] ; then
73 echo "Nope, that didn't work..."
77 echo "Look's good! Putting the old value back..."
78 cmd
="$CTDB setvar $var $val"
79 try_command_on_node
0 $cmd