-
Notifications
You must be signed in to change notification settings - Fork 491
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
Improvements to Consul nameresolver #2594
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5e44a2a
Misc fixes to consul nameresolver
ItalyPaleAle 8371727
Significant improvements to shuffling of results
ItalyPaleAle d0a1efa
De-register service before attempting to register again
ItalyPaleAle 184aa66
Fixes
ItalyPaleAle 2cc740c
Set DeregisterCriticalServiceAfter
ItalyPaleAle 002d77c
Reverted changes and fixed tests
ItalyPaleAle 4128f0b
Merge branch 'master' into consul-improv
ItalyPaleAle 87a27a4
💄
ItalyPaleAle 4c6a87c
Merge branch 'master' into consul-improv
berndverst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw your comment about using
deregistercriticalserviceafter
- but that fix not working.Should we rather deregister before registering?
Documentation for
ServiceDeregister(serviceID string) error
(https://developer.hashicorp.com/consul/commands/services/deregister) also recommends that itis meant to be paired with services register
.It may not completely solve the issue but would certainly be a good practice most probably and may also help in solving issues like #2489
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was actually what I first tried doing, and it didn't work because a service can have multiple instances if the app is scaled horizontally. Calling "ServiceDeregister" removed the entire service and so un-registered other instances of the app too.
I spent 2 hours on this yesterday and doesn't really look like Consul has any way to remove only one instance :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh ok, got it.