-
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
agent: auth.handler authenticate doesn't receive sigint #13600
Comments
Really interesting, thanks for this! |
I did a some testing with this too, and it looks like it's the Vault Write() call that's hanging: vault/command/agent/auth/auth.go Lines 218 to 224 in a52a497
From my understanding, there's a ShutdownCh that is closed on SIGINT, which triggers canceling the context in the auth handler. But since vault's Logical().Write() doesn't take a context argument (and creates its own) that write call hangs until it times out. I did a quick test to pass a context into the Write() call, and agent then responded immediately to a SIGINT. I'm not sure why Logical().Write() doesn't accept a context, so it's something we may want to revisit. |
The PR has been merged, thank you again for contributing to HashiCorp! |
Describe the bug
When running the vault agent, if authentication is misconfigured, the agent cannot be exited with a SIGINT until the timeout to connect to vault expires.
This issue is best reproduced running the process interactively.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
SIGINT should interrupt and exit more quickly
Environment:
vault status
): v1.8.7vault version
): v1.9.2Vault server configuration file(s):
Additional context
I haven't tried v1.9 since there are currently other issues with it.
The text was updated successfully, but these errors were encountered: