ctdb-tests: Reimplement daemons_stop() using ctdbd_wrapper
commit17dfd8b96bc1750a2f435caa1d208766257346f3
authorMartin Schwenke <martin@meltin.net>
Tue, 23 Aug 2016 01:49:54 +0000 (23 11:49 +1000)
committerAmitay Isaacs <amitay@samba.org>
Tue, 23 Aug 2016 19:17:46 +0000 (23 21:17 +0200)
treedbdc3b9e30589ed28babe097d256d37e7871399d
parentbcb33c46dfe3d6c06eb6b3b5e7f8625538772d5e
ctdb-tests: Reimplement daemons_stop() using ctdbd_wrapper

The current daemons_stop() implementation uses very loose matching to
decide which processes to kill if "ctdb shutdown" hasn't worked within
1 second.  This can cause ctdbd processes from other test runs to be
killed.

Instead, use ctdbd_wrapper, which uses the PID file as a last resort.
This has the advantage of never killing ctdbd processes from other
test runs.  However, this also has the obvious consequence that an
interrupted test run in one directory can not have its daemons cleaned
up from a new test run in a different directory.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Aug 23 21:17:46 CEST 2016 on sn-devel-144
ctdb/tests/simple/scripts/local_daemons.bash