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)
commita8dd716146dd305a8749ece01f7bd96c3a35947a
treebdac59aa4619d9e067436398613b5e52f40f1221
parent200c28fbb21a5f851d07adea8be16eb280addfd2
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>

(This used to be ctdb commit a20d94717d2e4ab866d8a002cdf39c0669b74c6a)
ctdb/config/functions
ctdb/tests/eventscripts/10.interface.releaseip.010.sh [new file with mode: 0755]
ctdb/tests/eventscripts/10.interface.releaseip.011.sh [new file with mode: 0755]
ctdb/tests/eventscripts/scripts/local.sh
ctdb/tests/eventscripts/stubs/ctdb
ctdb/tests/eventscripts/stubs/netstat