Skip to content
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

Do not bootstrap with non voters #4702

Merged
merged 1 commit into from
Sep 24, 2018
Merged

Do not bootstrap with non voters #4702

merged 1 commit into from
Sep 24, 2018

Conversation

dadgar
Copy link
Contributor

@dadgar dadgar commented Sep 20, 2018

Fixes an issue a cluster could be bootstrapped by promoting non voting servers
to voters. The fix is to not bootstrap unless bootstrap expect is reached with
voting servers only.

@shantanugadgil
Copy link
Contributor

shantanugadgil commented Sep 20, 2018

sorry to barge in into this, but I am observing a somewhat similar situation and was wondering if it could be due to this.

Nomad 0.8.5
Consul 1.2.3

I'll try to explain my scenario in brief:

3 (three) Nomad Servers in an AWS ASG using Terraform. (create before destroy set on the ASG and LC)
termination policy set to "OldestLaunchConfiguration" and "OldestInstance"
retry join of Nomad set using "autojoin" using EC2 tags.
bootstrap_expect is set to "3"

When I change the AMI to a new version and terraform apply (it goes to deposed) (all ok so far)
Now I start the dance of "increment by 1 and decrement by 1" (for the nomad servers)
counts go: 4,3,4,3,4,3
** This works fine if I use an ample delay during the up-down sequence.**

Sometimes (not all the time) if I take out the server which was the leader, then sometimes a leader is never chosen and all servers go into an endless loop of "unable to elect a leader"

The "no leader" situation also occurs if I do the counts in the following way: (starting with 3)
4,1,3
(I was just hoping for the 4,1,3 is an optimized way of evacuating the older EC2 instances)

@shantanugadgil
Copy link
Contributor

@dadgar bump?

@preetapan
Copy link
Member

@shantanugadgil what you describe seems unrelated to this. This was fixing bootstrapping with non voting servers which is only possible in nomad enterprise.

@preetapan preetapan merged commit 21f7198 into master Sep 24, 2018
@dadgar dadgar deleted the b-non-voter-boostrap branch September 24, 2018 17:01
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants