ctdb-scripts: Compact server-end TCP connection killing output
authorMartin Schwenke <martin@meltin.net>
Fri, 9 Jun 2017 04:34:56 +0000 (14:34 +1000)
committerMartin Schwenke <martins@samba.org>
Tue, 13 Jun 2017 07:12:19 +0000 (09:12 +0200)
commitdac075129b93dd0ecf0c59189f8e8ef294ab65c4
tree90a4f983c192f8b27e7e92a99a3fd14c4a70f387
parentd79c601fde6ec97e0463d42a133c5ec42193b025
ctdb-scripts: Compact server-end TCP connection killing output

When thousands of connections are being killed the logs are flooded
with information about connections that should be killed.  When some
connections are not killed then the number not killed is printed.
This is the wrong way around!  When debugging "fail-back" problems, it
is important to know details of connections that were *not* killed.
It is almost never important to know the full list of all connections
that were *supposed* to be killed.

Instead, print a summary showing how many connections of the total
were killed.  If any were not killed then print a list of remaining
connections.

Update unit tests: infrastructure for fake TCP connections, existing,
test cases, add new test cases.

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