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

Fix panic when Vault enters recovery mode, added test #20418

Merged
merged 2 commits into from
Apr 28, 2023

Conversation

peteski22
Copy link

Fixes regression in recovery mode where Vault panics, the bug was introduced by log rotation features (1.13) and this PR should correct the issue.

We're no longer calling .Flags() which already happens at the top of our Server.Run func, and instead accessing the relevant field (.flags). A test case has been added to verify recovery mode (and a flag check which matches the vanilla Server.Run path added within runRecoveryMode).

Thanks to folks for reporting and assisting with identifying the issue 👍🏼

Closes #20396

@peteski22 peteski22 added bug Used to indicate a potential bug core Issues and Pull-Requests specific to Vault Core command labels Apr 28, 2023
@peteski22 peteski22 added this to the 1.13.3 milestone Apr 28, 2023
@peteski22 peteski22 marked this pull request as ready for review April 28, 2023 10:43
@peteski22 peteski22 enabled auto-merge (squash) April 28, 2023 12:31
@peteski22 peteski22 merged commit 9ae8f48 into main Apr 28, 2023
@peteski22 peteski22 deleted the VAULT-15925/fix-recovery-mode-panic branch April 28, 2023 13:26
@peteski22 peteski22 restored the VAULT-15925/fix-recovery-mode-panic branch April 28, 2023 13:58
@kubawi kubawi deleted the VAULT-15925/fix-recovery-mode-panic branch May 2, 2023 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug command core Issues and Pull-Requests specific to Vault Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic when starting vault server with -recovery flag
4 participants