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

Service reload is deregistering the consul service #29279

Open
sandi91 opened this issue Jan 3, 2025 · 0 comments
Open

Service reload is deregistering the consul service #29279

sandi91 opened this issue Jan 3, 2025 · 0 comments

Comments

@sandi91
Copy link

sandi91 commented Jan 3, 2025

We have a vault cluster running the latest v1.18.3 which is using consul as storage and also registering the service in consul:

storage "consul" {
address = "127.0.0.1:8500"
path = "vault/poc"
service = "vault-poc"
}

Also we have enabled audit logs in vault and configured logrotate config to rotate the logs on daily basis. We also have added a command to reload it as mentioned in the docs (basically sending a HUP signal to the process)

{
daily
missingok
maxage 30
sharedscripts
rotate 10
compress
delaycompress
notifempty
copytruncate
postrotate
/usr/bin/systemctl reload vault 2> /dev/null || true
endscript
}

The issue here is with systemctl reload vault . We have tested it with different versions of vault and it is deregistering the consul service starting v1.17.0 version when it is working properly in v1.16.3. when I reload vault in v1.17.0 or later I get this in the logs:

[DEBUG] service_registration.consul: registration is now empty, deregistering service from consul

The consul dns entry for the vault cluster is used widely by the other apps and is a very important component in our installation, but we lose it after logrotate proceeds with the rotation.
To fix this I have to restart the service and unseal the nodes to get the consul service registered again.

I didn't find anything in release notes or issues regarding this specific issue. Are we doing something wrong or is this indeed a bug?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant