-
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
Service check definitions ignore check id and name. #3047
Comments
I'll have a look at this |
This doesn't look like a regression. I have the same behavior with 0.8.1
|
I'm too new to know for sure whether there is a reason for this. I have a patch which still needs a test but there is at least one pitfall in that you could then register a check with the same id for different services. However, that might already be possible through the |
@slackpad I would need some guidance here. |
@magiconair I believe the check name and id are being ignored in this loop Line 1159 in e2c37b4
|
yes, that's correct. |
Please ignore the patch since this isn't done yet. Deleting the branch apparently does not remove the reference to the commit. |
This patch adds support for a custom check id and name when registering a service. This is achieved by adding a CheckID and a Name field to the CheckType structure which is used to register checks with a service and when returning health check definitions. CheckDefinition is a superset of CheckType which duplicates some of the fields of CheckType. This patch decouples these two structures by removing the embedding of CheckType in CheckDefinition. Fixes #3047
After banging my head against this for a while I think this approach should be OK. The Following the Go Proverb "A little copying is better than a little dependency." I've copied the shared fields from The website files still need updating. |
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 ServerClient:
0.8.3
Server:
N/A
consul info
for both Client and ServerClient:
Server: N/A
Operating system and Environment details
Description of the Issue (and unexpected/desired result)
Reproduction steps
Create a service definition file with a check definition with a custom name and id. Start the consul agent client, and use the /v1/agent/checks endpoint to verify that the id is overridden with 'service:' and the name is overridden with "Service '' check".
Log Fragments or Link to gist
N/A
The text was updated successfully, but these errors were encountered: