-
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 watch handler runs on consul reload / restart #4609
Comments
I wonder if this PR #4554 might not fix this issue |
@pierresouchay any way to validate this will indeed fix the issue? |
@pierresouchay I don't think that #4554 can relate in any way to this report. @giladsh1 IMHO, this is an intended behavior and most probably it will remain like that. All watches and event handlers are executed exactly once during consul reload/restart. From my experience, tools invoked as consul {key[prefix],event} watch handlers, should be idempotent. They should produce the same output and state regardless of the fact how many times they have been executed. When running those during reload/restart the handlers in question receive the current global state of the system and apply it to the local environment. There was a bug which was fixed back in 1.0.1 - #4179. During consul reload, it was running each watch N times, where N was the number of reloads. The more reloads, the more times it will run each watch handler. However this is now fixed. |
Overview of the Issue
consul watch handler runs on reload or when restarting the service.
I've setup a simple watch on a key -
The key is not changes, but when reloading the service, consul runs the handler.
Please see logs below.
IMHO this is a major issue, since configuration change is sometimes required, but you don't want to runs unnecessary scripts that could potentially break your environment.
This could be related to another issue - #4179
Consul info for both Client and Server
Client info
Server info
Operating system and Environment details
CentOS Linux release 7.4.1708 (Core)
Log Fragments
The text was updated successfully, but these errors were encountered: