moby / swarmkit

A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.
Apache License 2.0
3.37k stars 616 forks source link

raft: Allow multiple addresses on raft cluster Join #342

Open abronan opened 8 years ago

abronan commented 8 years ago

Stumbled upon this during my investigation of Jepsen, but a nice improvement (for the bootstrapping part) would be to define multiple addresses on raft Join so that if the first address fails, we try on the second, third, etc. It is especially useful for tests using the command line as an entrypoint and simulating failures (like Jepsen).

Related to #253 and #291

Only complex part is to make sure that the operation is idempotent on every node; if multiple joins are sent because the first join was lost, we should end up in the same state. Which should already be the case.

Also not sure how it's going to look like after the CA stuff is included.

/cc @aaronlehmann @diogomonica

diogomonica commented 8 years ago

@abronan the certificates don't have IP addresses in them, so it doesn't really matter from my side. As long as they reuse the same certificate, they will "be" the same node.

abronan commented 8 years ago

Depending on #380

nathanleclaire commented 8 years ago

@abronan Any update on this?

stevvooe commented 8 years ago

@aluzzardi @aaronlehmann Have we not done this?

aluzzardi commented 8 years ago

@aaronlehmann This is a carry over 1.12.0. Do we want this for 1.13? P3 as well?

aaronlehmann commented 8 years ago

Sounds good. Should be pretty easy, but involves an engine-api change that may pose backward compatibility problems.

abronan commented 7 years ago

Closing, as this seems to be included now.

aaronlehmann commented 7 years ago

It looks like this is supported in the Docker API, but the implementation just takes the first address and ignores all others. In particular, node can only accept a single address in the JoinAddr field, so this will take swarmkit modifications to fix.