eventscripts: kill_tcp_connections() should send connections to stdin
authorMartin Schwenke <martin@meltin.net>
Thu, 25 Jul 2013 03:40:43 +0000 (13:40 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Mon, 29 Jul 2013 05:53:06 +0000 (15:53 +1000)
commita20d94717d2e4ab866d8a002cdf39c0669b74c6a
treebb7fe2bb3de4961d09cd3746179a55a275fb3f91
parentaf5aa369c266430fe912df0c26116b68bac3572e
eventscripts: kill_tcp_connections() should send connections to stdin

This avoids issuing multiple "ctdb killtcp" commands to terminate tcp
connections, one per connection.  This will considerably reduce the
time when there is a large number of tcp connections.  This also makes
it possible to avoid calling "ctdb killtcp" when there are no connections.

Add a couple of unit tests for killtcp and update eventscript unit
test infrastructure to support.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
config/functions
tests/eventscripts/10.interface.releaseip.010.sh [new file with mode: 0755]
tests/eventscripts/10.interface.releaseip.011.sh [new file with mode: 0755]
tests/eventscripts/scripts/local.sh
tests/eventscripts/stubs/ctdb
tests/eventscripts/stubs/netstat