Enable TCP keep-alives in the twisted rpc client
Since a dead node will not be detected (in our current implementation)
by the twisted rpc layer, we should enable TCP-level keepalives in order
to at least detect TCP-level problems.
This patch changes the rpc.NodeController class to enable TCP-keepalives
before doing the remote call (so a failure in the connect/login sequence
will not be protected by this, but there twisted - if I understood
correctly - has its own timeouts).
We should always have a TCP-based transport under our object broker, but
I think it's better to check first for support of the setTcpKeepAlive
function and only if it's available call it.
Note that the interval and keepalive behaviour must be tuned at kernel
level (sysctls net.ipv4.tcp_keepalive_* in Linux) and cannot be tuned
from within our code.
Reviewed-by: imsnah