-
Notifications
You must be signed in to change notification settings - Fork 782
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
Consul template reload signal on Windows 10 fails #1442
Comments
Hey @woodytec, thanks for reporting this. That error bubbles up from Go's syscall library. Digging around a bit my first thought is that neither SIGHUP nor SIGINT are supported. The windows docs [1] I found lists the signals windows respects and SIGHUP isn't there. SIGINT is in that list but the Go docs [2] call it out as not supported. Maybe try one of the other signals in the list at [1]. [1] https://docs.microsoft.com/en-us/previous-versions/xdkz3x12(v=vs.140) |
Hey @eikenb, Thanks for your answer. I've tried all the signals mentionned in the list at [1], they all show the exact same output :
Anyway, sending another signal than SIGHUP would not help me a lot as Prometheus' reload signal cannot be changed... Another solution would be to be able to make and API call from Consul-template instead of sending a signal, but as far as I know it's not possible, is it ? |
I found a quick workaround to solve Prometheus' reload which is to let Consul-template kill and respawn it (what means I did not specify any reload signal in CT configuration file). This seems to do the job for Prometheus, but it is kind of problematic in other usecases. For example Vector (that I am using to ship logs from text files to Loki) includes an option to automatically watch for config changes and reload itself when necessary. Therefore I don't want it to be killed and respawned by CT nor to receive a reload signal (what would cause the above bugs for the moment...). I feel like a first step toward the solution would be to implement a flag on CT to disable reloading the child process. |
I'm adding 'enhancement' label here to address the idea of having a way to disable reloading (for use on Windows). Though I'm not 100% on that and might just disable reloading on windows by default. Unless there is a way to get it working... which is why I'm leaving the 'bug' label, as it'd be nice to actually fix this if possible, but I have no clue as it seems like it should work based on the docs I've seen. Maybe someone with more Windows knowledge will help out. |
There was a bug with setting the reload signal to nothing that was fixed by #1610. I'm pretty sure that change fixes this issue by allowing the empty setting to actually disable the reload signal as advertised. |
Consul Template version
Version 0.25.1
Configuration
Command
Expected behavior
Prometheus should be reloaded by CT when values change in Consul.
Actual behavior
Consul-template is working pretty well until a reload happens. Prometheus is not reloaded. CT seems to try to send the signal specified in its configuration file but logs show :
This happens whatever the reload signal is. I first thought it was because SIGHUP is not implemented on Windows, but trying with SIGINT showed the same output.
The text was updated successfully, but these errors were encountered: