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

[Fix] Service tags not added to health checks #3642

Merged
merged 2 commits into from
Dec 14, 2017

Conversation

yfouquet
Copy link
Contributor

@yfouquet yfouquet commented Nov 3, 2017

Since commit 9685bdc, service tags are added to the health checks.
Otherwise, when adding a service, tags are not added to its check.

In updateSyncState, we compare the checks of the local agent with the checks of the catalog.
It appears that the service tags are different (missing in one case), and so the check is synchronized.
That increase the ModifyIndex periodically when nothing changes.

Fixed it by adding serviceTags to the check.

Note that the issue appeared in version 0.8.2.
Looks related to issue #3259.

@yfouquet
Copy link
Contributor Author

Hi @slackpad @magiconair,
I really think that it would fix some issues for blocking query users.
Could you please have a look at it?

@yfouquet
Copy link
Contributor Author

A simple way to see the issue is to compare checks seen by the agent and health endpoints.
In ../health/service/<my_service>, the ServiceTags of some checks are not empty.
In .../agent/checks, the ServiceTags are empty for the same checkId

@slackpad slackpad added the type/bug Feature does not function as expected label Nov 16, 2017
@slackpad slackpad added this to the 1.0.2 milestone Nov 16, 2017
@yfouquet yfouquet force-pushed the master branch 2 times, most recently from 871c1a5 to 241741f Compare November 23, 2017 21:36
@yfouquet
Copy link
Contributor Author

Hi @slackpad,
I have adjusted the documentation regarding ServiceTags in health checks.
Please tell me what can be done to help you handle this PR.

Since commit 9685bdc, service tags are added to the health checks.
Otherwise, when adding a service, tags are not added to its check.

In updateSyncState, we compare the checks of the local agent with the checks of the catalog.
It appears that the service tags are different (missing in one case), and so the check is synchronized.
That increase the ModifyIndex periodically when nothing changes.

Fixed it by adding serviceTags to the check.

Note that the issue appeared in version 0.8.2.
Looks related to hashicorp#3259.
Add some missing ServiceTags.
Replace null ServiceTags by empty list (ServiceTags cannot be null).
@yfouquet
Copy link
Contributor Author

yfouquet commented Dec 14, 2017

Hi,
We have deployed consul agents with this patch in our datacenters.
The result is that long-polling requests can now last 10 minutes instead of a few seconds (or milliseconds for some services).
The following graph shows the long-polling request duration and count on a service with 500 instances inside the local datacenter.
consul-longpolling

@slackpad slackpad merged commit f491a55 into hashicorp:master Dec 14, 2017
@slackpad
Copy link
Contributor

Thank you so much for finding this and submitting a PR!

@magiconair
Copy link
Contributor

oops...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants