-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 unlocked mounts read #29091
Fix unlocked mounts read #29091
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to miss the core_metrics change from https://github.com/hashicorp/vault-enterprise/pull/7083/files#diff-02f8615172474bd9e2da0f53c035171ab26c9f1351ded5c101aa19b0c4ace6a9
This PR fixes copy-paste error in the product usage code where we were taking out the authLock to access the mount table. While we're add it we can remove the existing lock grabbing in the product usage goroutine in favor of a serialized startup/teardown of censusManager and its core dependency which requires the lock. This requires some minor test edits, so created a test helper for that. By moving the censusManager teardown before expirationManager teardown, we can effectively ensure the goroutine is completely stopped outside of any expirationManager change. We are already guaranteed serial startup, so this should free us of any complex lock semantics.
73e4e4d
to
032708b
Compare
Build Results: |
CI Results:
|
Good catch! It was a bad cherry-pick 🤦. I put the changelog for the bugfix in here as well now and editorialized the commit message a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! Thanks :)
This commit enforces complete censusManager teardown prior to stopping the expiration manager, allowing us to simplify locking elsewhere in censusManager code.
We're now guaranteed to not have state change underneath us, since censusManager goroutine lifecycles are postUnseal -> preSeal.
Description
What does this PR do?
TODO only if you're a HashiCorp employee
backport/
label that matches the desired release branch. Note that in the CE repo, the latest release branch will look likebackport/x.x.x
, but older release branches will bebackport/ent/x.x.x+ent
.of a public function, even if that change is in a CE file, double check that
applying the patch for this PR to the ENT repo and running tests doesn't
break any tests. Sometimes ENT only tests rely on public functions in CE
files.
in the PR description, commit message, or branch name.
description. Also, make sure the changelog is in this PR, not in your ENT PR.