ctdb-tests: New function ctdb_set_pnn() to change PNN
authorMartin Schwenke <martin@meltin.net>
Sat, 18 Apr 2015 11:55:50 +0000 (21:55 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 27 Apr 2015 01:32:10 +0000 (03:32 +0200)
commitaf93ae1a540003824b32301d3c9f09c713f1fa7a
tree7448b847f9e4b858cde71d00626d424434f7fd90
parent579dda6858f547d360073cd67235e49ab03b355e
ctdb-tests: New function ctdb_set_pnn() to change PNN

ctdb_get_pnn() incorrectly caches to the same file regardless of what
node is selected via FAKE_CTDB_PNN.

Instead, set the PNN using new function ctdb_get_pnn(), which also
makes CTDB_VARDIR point to a node-specific subdirectory.  This means
that ctdb_get_pnn() will correctly cache to the node-specific
directory.

Fake tickle and TDB files/directories used by the ctdb stub need to be
the same across all PNNs, so change these to use
$EVENTSCRIPTS_TESTS_VAR_DIR instead of node-specific $CTDB_VARDIR.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/eventscripts/scripts/local.sh
ctdb/tests/eventscripts/statd-callout.005.sh
ctdb/tests/eventscripts/statd-callout.006.sh
ctdb/tests/eventscripts/stubs/ctdb