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

consul: avoid extra sync operations when no action required #10865

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

shoenig
Copy link
Member

@shoenig shoenig commented Jul 7, 2021

This PR makes it so the Consul sync logic will ignore operations that
do not specify an action to take (i.e. [de-]register [services|checks]).

Ideally such noops would be discarded at the callsites (i.e. users
of [Create|Update|Remove]Workload], but we can also be defensive
at the commit point.

Also adds 2 trace logging statements which are helpful for diagnosing
sync operations with Consul - when they happen and why.

Fixes #10797

This PR makes it so the Consul sync logic will ignore operations that
do not specify an action to take (i.e. [de-]register [services|checks]).

Ideally such noops would be discarded at the callsites (i.e. users
of [Create|Update|Remove]Workload], but we can also be defensive
at the commit point.

Also adds 2 trace logging statements which are helpful for diagnosing
sync operations with Consul - when they happen and why.

Fixes #10797
@shoenig shoenig force-pushed the b-deregister-noops branch from 18ce231 to 421a6a8 Compare July 7, 2021 16:25
@vercel vercel bot temporarily deployed to Preview – nomad July 7, 2021 16:25 Inactive
@shoenig shoenig marked this pull request as ready for review July 7, 2021 18:09
@shoenig shoenig requested review from tgross and schmichael July 7, 2021 18:09
@shoenig shoenig merged commit 60a92ff into main Jul 7, 2021
@shoenig shoenig deleted the b-deregister-noops branch July 7, 2021 18:42
@notnoop notnoop mentioned this pull request Jul 28, 2021
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

service_hook calls deregister a whole lot with nothing to do
2 participants