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

Watch handlers are not being stopped on reload (regression in 0.8.4) #3185

Closed
preetapan opened this issue Jun 23, 2017 · 1 comment
Closed
Assignees

Comments

@preetapan
Copy link
Contributor

If you have a question, please direct it to the
consul mailing list if it hasn't been
addressed in either the FAQ or in one
of the Consul Guides.

When filing a bug, please include the following:

consul version for both Client and Server

Client: 0.8.4
Server: 0.8.4

Description of the Issue (and unexpected/desired result)

Found when working on issue #3018. The file descriptor bug described there still exists. However, prior to 0.8.4, when consul reload is called , any existing watch handlers were closed. After 0.8.4, the old handlers are not stopped, and each new consul reload increases the number of handlers by n, if the config had n handlers to start with.

Reproduction steps

Configure a single watch handler that echoes to stdout, and start consul agent. Run consul reload a few times, you will notice multiple lines of output to stdout. This is because the previous watch handler is not stopped when reload is called. This can cause problems with users using watch handlers to restart services or count updates to keys, because it keeps linearly increasing with the number of calls to consul reloadl

Log Fragments or Link to gist

Include appropriate Client or Server log fragments. If the log is longer
than a few dozen lines, please include the URL to the
gist.

TIP: Use -log-level=TRACE on the client and server to capture the maximum log detail.

@preetapan preetapan self-assigned this Jun 23, 2017
@slackpad
Copy link
Contributor

@preetapan this should be fixed by #3189, I think.

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

2 participants