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

Command to force a leader election #494

Closed
nbrownus opened this issue Aug 5, 2015 · 8 comments
Closed

Command to force a leader election #494

nbrownus opened this issue Aug 5, 2015 · 8 comments

Comments

@nbrownus
Copy link
Contributor

nbrownus commented Aug 5, 2015

Found myself in a situation where I needed to change the leader of a vault cluster. I did this by sealing the existing leader. It would be preferable to have a way to do force an election without sealing the leader since unsealing may require multiple people to enter key shares.

Ideally the existing leader would not be eligible.

@sheldonh
Copy link
Contributor

I have a consul-backed vault cluster where all three vaults are in standby, reporting a leader IP that left the cluster some time ago. :-(

@jefferai
Copy link
Member

This was fixed in 0.5.2 (via #1146) with the step-down command.

@sheldonh
Copy link
Contributor

Ah, nice one. Will upgrade. Thanks!

@jefferai
Copy link
Member

@sheldonh To be clear, I have no idea if your problem is fixed. My comment and closing are because the original request was fixed. But, upgrading can't hurt. If you still have an issue, open a new ticket.

@jefferai jefferai reopened this Apr 19, 2016
@1hanymhajna
Copy link

i'm using vault HA version: 0.6.4 and still have same problem, vault standby nodes reporting a leader IP that left the cluster some time ago,
Is there an option to make it automatically without need to run step-down on it?

@VVMichaelSawyer
Copy link

I had this same issue. Turns out the audit log was not writable by the newly spun up vault server. Changing ownership of the audit log back to the proper user allowed the servers to elect a new leader. Hope this helps.

@weaseal
Copy link

weaseal commented Jan 21, 2020

I just spent hours and hours debugging Vault and found that @VVMichaelSawyer 's hint here solved my issue. I've been cobbling together a vault instance from a backup and had configured an audit-log-directory prior to the backup's creation, that did not exist on the restore instance. Even with Vault debugging enabled, the stdout/stderr log contained zero information about leader election issues nor the related missing directory problem. Vault 1.1.3

@oliverisaac
Copy link
Contributor

I keep coming back to this thread when trying to fix election issues so figured I'd add this link: if you have lost quorum and need to force another vault pod to become leader, hashicorp has docs on how to do that: https://developer.hashicorp.com/vault/tutorials/raft/raft-lost-quorum

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

No branches or pull requests

9 participants