-
Notifications
You must be signed in to change notification settings - Fork 33
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
Check deregister behavior for consul appears incorrect #57
Comments
For what its worth I would favor some kind of explicit calculated id like {serviceKey}-edgex-health but I am working on extending the client to allow registering additional checks so I am considerably biased towards something that may not end up viable. Happy to submit any kind of fix for this in the meantime though. |
Agreed that the BTW, all my testing shows it deregister just fine. This may be because we are deregistering the whole service as well as the check. |
Yeah I think the service deregister might "cascade" and take care of it anyway. I'm looking to be able to add and remove health checks on the fly (without deregistering service) so need to make sure check deregister works there. Service key ought to work fine I will try and get a PR sent for that today. |
Looking at the consul docs for check registration (https://www.consul.io/api-docs/agent/check#register-check) It looks like they take both a ServiceID and an ID property. If the ID is not provided, it defaults to the check name.
Deregister then takes the ID (name) as input, where here we pass the service key (ServiceID).
If you inspect the check in the consul UI you can see the check ID as something like "Health Check: edgex-core-command", and I have confirmed I need to run
curl -X PUT edgex-core-consul:8500/v1/agent/check/deregister?check_id=Health%20Check%3A%20edgex-core-command
to deregister a checkI am not sure if it is preferable here to use an explicit ID to register, to just deregister using the name, or to register using the service key as the ID.
The text was updated successfully, but these errors were encountered: