ctdb-ipalloc: Use a cumulative timeout for takeover run stages
commitf557d0c80907458f3b38e907fcafaa03b1f52b53
authorMartin Schwenke <martin@meltin.net>
Fri, 27 May 2016 05:22:27 +0000 (27 15:22 +1000)
committerKarolin Seeger <kseeger@samba.org>
Wed, 21 Sep 2016 09:15:07 +0000 (21 11:15 +0200)
treee64baf3448b620e82fdbf65498fb70a4ba01ee8b
parentaa45e1a88c0f3eee254f4445be95484bd7ef043e
ctdb-ipalloc: Use a cumulative timeout for takeover run stages

RELEASE_IP sometimes times out because killing TCP connections can
take a long time.

The aim of the takeover timeout is actually to limit the total amount
of time for an IP takeover run.  So, calculate a combined timeout
offset once and use it for each of the RELEASE_IP, TAKEOVER_IP,
IPREALLOCATED stages.  This gives RELEASE_IP more time to kill TCP
connections but still limits the total time.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit c40fc62642ff5ac49b75e9af49c299e33dbc9073)
ctdb/server/ctdb_takeover.c