bitwalker/libcluster

General reconnect failure

balena opened this issue · 0 comments

DNS poll, Kubernetes, Kubernetes DNS, Kubernetes DNS SRV and Rancher strategies all don't reconnect nodes case they disconnect for any reason. They need that the backing service discovery also bounces the list, which doesn't always (never?) happen.

This generated the series of PR's #143, #144, #145, #146 and #147.

The logic can be greatly simplified by passing the whole list of nodes to Cluster.Strategy.connect_nodes/4, as internally it already lists the connected nodes and connect only the "added" ones. Check here: https://github.com/bitwalker/libcluster/blob/master/lib/strategy/strategy.ex#L43.