-
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
Vault Agent doesn't honor SIGHUP Signal #8216
Comments
Hi all! I'm curious to know if this is an expected behaviour, in which case I'll just continue with the workaround of using a cronjob to periodically restart the agent and add this as a feature request. |
Yes, this does seem like a bug. I would expect that a hup signal would reload certs for both auto-auth as well as certs for TLS listeners. It is curious that this issue has both a |
Ah, looks like there's a TODO for this in the Agent's code We're injecting the Vault Agent with expiring certs in the similar way (hashicorp/vault-k8s#213), so getting them SIGHUP'd would be great to avoid having to restart the whole pod. |
I'm one upping this, I want to use this for auto-renewing certificate authenticated vault agent |
Would addressing this also perhaps include template configuration reloading? |
Would be nice if vault agent could be used for anything; not particularly useful if it has to be restarted every day |
Describe the bug
Hi friends! We've run into an interesting cert renewal problem with the Vault Agent.
We are using TLS certs+client cert in the Vault Agent to connect to our Vault Server. We have created templates that pull updated certs for the Vault Agent from the Vault server so that the Vault Agent can rotate its TLS certificates. Expectation is that if we send a SIGHUP signal to the Vault Agent, it will reload the TLS certificates that we have generated for it via Templates.
TLS certificate renewal works as expected and writes valid TLS certs to the right locations, but Vault Agent doesn't respond to the SIGHUP signal, and does not reload the certificates into its running config. If we restart the Vault Agent daemon, it loads the new certificates and works as expected.
To Reproduce
Steps to reproduce the behavior:
curl -v https://127.0.0.1:8200/v1/sys/init
. Observe that the original certificate is still running (as expected.)kill -1 $vaultpid
orpkill -HUP vault
.kill
command returns 0, indicating success.curl -v https://127.0.0.1:8200/v1/sys/init
and find that it has not changed.openssl x509 -in /usr/local/vault/client.crt -noout -text
. Compare hashes of key that Templates have written to disk and verify that they match theclient.crt
as expected.journalctl -u vault
and find that there is no logged reload of the agent.curl -v https://127.0.0.1:8200/v1/sys/init
Expected behavior
That the templated certificates and key will be loaded and used by the Vault Agent after the Vault Agent service is sent a SIGHUP.
Environment:
vault status
):1.3.0
vault version
):Vault v1.3.1
Vault server configuration file(s):
Additional context
Final Config for the runner seems to indicate that a ReloadSignal is not present:
The text was updated successfully, but these errors were encountered: