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

Backport of VAULT-14048: raft-autopilot appears to refuse to remove a node which has left and wouldn't impact stability into release/1.13.x #20436

Conversation

hc-github-team-secure-vault-core
Copy link
Contributor

Backport

This PR is auto-generated from #19472 to be assessed for backporting due to the inclusion of the label backport/1.13.x.

The below text is copied from the body of the original PR.


This bug was detected during manual testing for the 1.13.0 release and as a precaution the following PRs were reverted:

After some investigation the problem seems to be that the NodeType isn't being supplied by Vault when autopilot asks it for its KnownServers during pruning. As a result there are no potential voters flagged in the voter registry, we have a maxRemoval which is < 1 which triggers the debug message about removing a majority of voting servers being unsafe and autopilot refuses to remove the failed voting server.

This PR adds the NodeType for the leader and, where possible, for the follower nodes. It also restores the autopilot version to v0.2.0.

Files of note:

  • go.mod
  • physical/raft/raft_autopilot.go
  • vault/external_tests/raft/raft_autopilot_test.go

Most other changed files are due to exporting GetRaftBackend.

Tests added:

  • TestDelegate_KnownServers_NodeType (Ent)
  • TestRaft_Autopilot_DeadServerCleanup

Following a successfully merged PR I will raise an Enterprise specific PR to update the packages and add another test.


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/VAULT-14048/fix-autopilot-refuse-removal/apparently-becoming-whippet branch 2 times, most recently from f15049d to b85f092 Compare April 29, 2023 13:23
@peteski22 peteski22 enabled auto-merge (squash) April 29, 2023 13:25
@peteski22 peteski22 merged commit 1ed28d9 into release/1.13.x Apr 29, 2023
@peteski22 peteski22 deleted the backport/VAULT-14048/fix-autopilot-refuse-removal/apparently-becoming-whippet branch May 2, 2023 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants