ctdb-tcp: Make error handling for outbound connection consistent
commit3e222ac6b9329dfbf34f124fae0b0f64d2cd76ac
authorMartin Schwenke <martin@meltin.net>
Tue, 28 Jan 2020 05:49:14 +0000 (28 16:49 +1100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 18 Feb 2020 07:18:20 +0000 (18 07:18 +0000)
treecf6d59d1d6a7a65d6468850ee017558aab511764
parentb1fba6c7a066e577e637acc0f8968c2ec264f0ea
ctdb-tcp: Make error handling for outbound connection consistent

If we can't bind the local end of an outgoing connection then
something has gone wrong.  Retrying is better than failing into a
zombie state.  The interface might come back up and/or the address my
be reconfigured.

While here, do the same thing for the other (potentially transient)
failures.

The unknown address family failure is special but just handle it via a
retry.  Technically it can't happen because the node address parsing
can only return values with address family AF_INET or AF_INET6.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14274
RN: Retry inter-node TCP connections on more transient failures

Reported-by: 耿纪超 <gengjichao@jd.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit a40fc709cc972dadb40efbf1394b10fae3cfcc07)
ctdb/tcp/tcp_connect.c