hashicorp / hashicorp/consul

Raft election using consul leave

Open
#9,755 11 comments 0 reactions 0 assignees View on GitHub
theme/internals type/question
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

Hello Hashicorp folks!!
I'm using consul v1.7.2, in my setup I have 5 consul-servers.
If i gracefully stop one of the consul servers (not the current leader) using `consul leave && systemctl stop consul` and then i start the process backs up a new leadership election starts.

If i just stop the process with `systemctl stop consul` a new election isn't triggered.

Is this the correct behavior?
It seems wrong to me trigger an election when a non leader server is gracefully stopped.

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior on Consul v1.7.2 with five servers, comparing `consul leave && systemctl stop consul` against `systemctl stop consul`. Review the election and membership behavior involved, then determine whether the differing outcomes are expected; done means the behavior is explained and any confirmed defect is fixed with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.