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 api/seal-status: fix deadlock when namespace is set on seal-status calls into release/1.13.x #23877

Conversation

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

Backport

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

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@jasonodonnell
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.

merge conflict error: POST https://api.github.com/repos/hashicorp/vault/merges: 409 Merge conflict []

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


PR #10725 introduced a change to support namespaces in vault status requests but introduced a deadlock on calls to sys/seal-status when namespaces are included.

When requests have a namespace configured the handler routes the request through switchedLockHandleRequest and holds the read statelock for the duration of the request:

if doLocking {
c.stateLock.RLock()
defer c.stateLock.RUnlock()
}
.

I've added a locking arg so the caller can decide if the statelock needs to be grabbed or not.


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/seal-status-deadlock/evidently-singular-goldfish branch from 72fe7e8 to 8a5e6fc Compare October 27, 2023 14:00
@hashicorp-cla
Copy link

hashicorp-cla commented Oct 27, 2023

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Oct 27, 2023
…lls (#23861)

* api/seal-status: fix deadlock when namespace is set on seal-status calls

* changelog
@jasonodonnell jasonodonnell force-pushed the backport/seal-status-deadlock/evidently-singular-goldfish branch from c9cb80b to eb7b7ff Compare October 27, 2023 14:12
@jasonodonnell jasonodonnell marked this pull request as ready for review October 27, 2023 14:13
@jasonodonnell jasonodonnell added this to the 1.13.10 milestone Oct 27, 2023
@jasonodonnell jasonodonnell enabled auto-merge (squash) October 27, 2023 14:17
@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@jasonodonnell jasonodonnell merged commit 52879c0 into release/1.13.x Oct 27, 2023
@jasonodonnell jasonodonnell deleted the backport/seal-status-deadlock/evidently-singular-goldfish branch October 27, 2023 14:49
@github-actions
Copy link

CI Results:
All Go tests succeeded! ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants