-
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
Watch getting triggered in consul reload #7446
Comments
Might be fixed by #7345 => do you have the same behavior with Consul 1.5.2 or less ? |
Currently, I'm using consul 1.7.1, which was upgraded from 1.6.2. I have no information about 1.5.2 |
@akshatgit I added a unit test in #7449 ... from what I see, it does not happen on Consul upstream anymore (while this test fails often with 1.7.0 for instance), so, probably the same bug as #7318 (aka, a bug present since 1.5.3) |
Great Work @pierresouchay! |
@pierresouchay, |
@akshatgit what is the exact behavior you have for the 2nd (when you have 3 notifications) notification ? empty ? |
I have a script handler, which looks for a change in member list for the particular service when watch is triggered. This reports '0' change in the member list. |
@akshatgit For me, doing at restart on an agent having a service might be doing 3 changes:
So, nothing really abnormal. |
If you see my watch config, I have mentioned |
@akshatgit I am curious because I spent quite some time to have a precise unit test in #7449 => and I am able to run 200+ times this test without a single failure on Consul upstream. Are you sure you are doing a |
I think there is a misunderstanding, for consul reload this issue is fixed. I reported it again for stop-start. Thanks, |
@akshatgit Will be probably fixed by #7526 |
@pierresouchay, I am not sure if #7526 will fix the issue. The problem was watch getting triggered thrice when another agent having service was stop/start. This will make sure the watch is shut down when the agent with watch is stopped. Please correct me if I am wrong. |
This ensures no regression about hashicorp#7318 And ensure that hashicorp#7446 cannot happen anymore
Does this issue have any relation to #571? |
The reload issue seem to still be in version 1.7.2. When you reload the watch on the instance that is doing the watch, not the service being watched, the script is triggered. |
When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.
Overview of the Issue
I have a service watch configured with 'passingonly' parameter. Whenever I do a consul reload on the box with service running, the watch gets triggered twice. Consul reload should not trigger watch. Please help me if I am configuring anything wrong.
Reproduction Steps
Steps to reproduce this issue, eg:
Consul info for both Client and Server
Client info
Server info
Operating system and Environment details
Debian 10.1
The text was updated successfully, but these errors were encountered: