-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the SWIM membership and gossip protocol #180
Conversation
This PR has passed 'Verify' and is ready for review and approval! |
pub fn set_gossip_peer(&mut self, mut gp: Vec<String>) -> &mut Config { | ||
for p in gp.iter_mut() { | ||
if p.find(':').is_none() { | ||
p.push_str(":9634"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be nice to have this magic # as a constant at the top of a file somewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing it. The only place that is harder is the options themselves - since you use the docstring to get a default, 9634 will be magic there. Probably a good reason to consider moving the whole options thing to Clap.
awesome :-) I'm happy to help resolve any conflicts on master. |
36d6494
to
3d566b3
Compare
This PR has passed 'Verify' and is ready for review and approval! |
3d566b3
to
0e542d4
Compare
This PR has passed 'Verify' and is ready for review and approval! |
1 similar comment
This PR has passed 'Verify' and is ready for review and approval! |
This commit implements the [SWIM](https://www.cs.cornell.edu/~asdas/research/dsn02-swim.pdf) gossip protocol. We have a few modifications * We prefer members to stay alive, rather than dead; if a member receives a Confirmed message about itself, it updates its incarnation and becomes alive * We have the idea of 'permanent' members, which we will attempt to ping even if they are confirmed dead. This allows the system to heal from partitions, as long as everyone has a permanent member on both sides of the split. To use: ``` $ bldr start chef/redis --gossip-peer 192.168.1.1 ``` More details: * Fixes a bug in bldr-build where we fail to build a docker container for a package if the bldr user already exists. * Adds chef/rngd to the base bldr docker image. * Adds the --gossip-listen, --gossip-peer, and --gossip-permanent options * Adds errors for JSON encode/decode, and failure to contact initial peers. * Adds a gossip::client module for outbound communication * Adds a gossip::server module for managing the gossip lifecycle * Adds inbound, outbound, and failure detection threads to the server * Adds functional tests for core gossip functionality, requiring our test suite to be run with the NET_ADM privilege in docker. * Adds the /gossip sidecar, to get debugging data about the gossip layer, opening up all sorts of fun visualizations. * Makes the default gossip port a constant * Fixes error output for JSON to use Display rather than Debug
0e542d4
to
bf92fc7
Compare
This PR has passed 'Verify' and is ready for review and approval! |
1 similar comment
This PR has passed 'Verify' and is ready for review and approval! |
@delivery approve |
Merged change b19b1dcf-9c14-4151-be85-61909bb8d5dc From review branch swim-membership-fixed into master Signed-off-by: adam <[email protected]>
Change: b19b1dcf-9c14-4151-be85-61909bb8d5dc approved by: @adamhjk |
This commit implements the
SWIM gossip
protocol. We have a few modifications
receives a Confirmed message about itself, it updates its incarnation
and becomes alive
even if they are confirmed dead. This allows the system to heal from
partitions, as long as everyone has a permanent member on both sides
of the split.
To use:
More details:
the bldr user already exists.
options
peers.
test suite to be run with the NET_ADM privilege in docker.
layer, opening up all sorts of fun visualizations.