ctdb-tcp: Make error handling for outbound connection consistent
authorMartin Schwenke <martin@meltin.net>
Tue, 28 Jan 2020 05:49:14 +0000 (16:49 +1100)
committerAmitay Isaacs <amitay@samba.org>
Wed, 12 Feb 2020 03:11:39 +0000 (03:11 +0000)
commita40fc709cc972dadb40efbf1394b10fae3cfcc07
tree910cbc279469d59216b769a50b194779dd32cdf2
parentad78496664c1f613237539983b0a30b4cd94737a
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

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