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)
committerMartin Schwenke <martin@meltin.net>
Wed, 24 Feb 2016 10:44:13 +0000 (21:44 +1100)
commitab5761b0cfa4804fc10dafa82588148bd2b48cef
treee3faa9ca6caebddba613c55a76b52a110487a619
parent5fff429fcf00d6c6d7d919e10a23fa97a5c1eb85
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>
(Imported from commit af93ae1a540003824b32301d3c9f09c713f1fa7a)
tests/eventscripts/scripts/local.sh
tests/eventscripts/statd-callout.005.sh
tests/eventscripts/statd-callout.006.sh
tests/eventscripts/stubs/ctdb