-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
0.10.3 re-seals if it cant revoke DB creds #4846
Comments
Downgrading the server back to 0.9.6 works fine
however the server never bounces and stays unsealed as expected |
@myoung34 Thanks for the report, we will work on a fix for this. This code is only hit when a lease is revoked after the role has been deleted from vault. As a work around you could make sure all leases are removed prior to deleting the role. Just out of curiosity how are you tearing down the database? |
@briankassouf We spin up staging daily from prod snapshots using terraform, database included. The vault stuff (secrets/roles/etc) are created from terraform as well, similar to:
|
You would see this sort of issue if - for whatever reason - you had to rollback a database to an earlier snapshot without those roles. I can see that making disaster recovery extremely painful. |
@myoung34 I see, so terraform is likely removing the role and then unmounting the backend, which will try to revoke all the leases. This was introduced in a recent improvement that attempted to revoke the lease (and subsequently remove the users from the configured database) if the role didn't exist. Prior to this change tearing down the database backend like that would have left users lingering in the database. |
We tear down the database so lingering users are a non issue in this context. The production database does not tear down so leases work there. As long as vault doesn't panic and bounce, resealing, it resolved my current issues with upgrading |
If you rolled back the whole datastore then the leases would also be rolled back. But this panic is now fixed so that shouldn't be an issue going forward. |
We just encountered this issue in our dev environment. We created the issue by renaming a role for database creds using terraform. Then applied those changes to vault using terraform while there were outstanding leases for the old role. |
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Expected behavior
in 0.9.6 nothing happened.
In 0.10.3 the server bounces and re-seals
Environment:
Vault server configuration file(s):
n/a
Additional context
We tear down staging nightly. During the day we let devs create temp creds using the database provider
The text was updated successfully, but these errors were encountered: