-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 monitor doesn't respond to SIGINT/TERM until initial log lines come in #3891
Comments
I think the ACL part is even a red-herring I just tested master locally and I've edited the title to make the scope clearer. Thanks for the report! |
Breadcrumbs: note that we do register consul/command/commands_oss.go Line 78 in 521e46c
And that includes Line 51 in 521e46c
|
It seems that this only happens when there is no output yet. In my case there was only debug events in the log and i wasn't useing debug level so it hung uninteruptible. As soon as I allow DEBUG level I saw logs and Ctrl-C works fine. In your case here @c4milo the ACL issue prevents any logs from ever being fetched causing same issue. |
This is caused by the call to the monitor API here: consul/command/monitor/monitor.go Line 57 in 4c90fbf
Being made before In turn the agent calls the monitor API which effectively blocks until some matching log lines come in:
Note that not even response headers were returned immediately. It seems like it would be a nicer API for a streaming response to have the headers return immediately and the the body only stream in as there is content. That seems to be what our own client is expecting. PR incoming. |
Fixes #3891: agent monitor no longer unresponsive before logs stream.
Nice! thank you @banks! |
@c4milo just checking that did actually fix you're issue right? I think the ACL thin was unrelated but just wanted to check! |
@banks, I haven't had a chance to build a custom binary with this fix yet, I'll report back once I can do that. In the mean time, I believe you missed adding an entry in the CHANGELOG :) |
Great catch @c4milo thanks ;) |
@MichaelSteffens good catch yep those are all obsolete here now thanks. |
When running
consul monitor
on machines with acl tokens without enough privileges, it blocks forever and doesn't respond to SIGINT or SIGTERM signals.Reproduction steps
consul monitor
Expected behavior
Exit immediately with a message indicating the lack of permissions.
consul version
for both Client and ServerClient:
v1.0.6
Server:
v1.0.6
The text was updated successfully, but these errors were encountered: