Closed ryanbreen closed 9 years ago
Looks like a bug in Consul. I'll take a look at this shortly. Thanks @ryanbreen !
Notes: service registers but has 0 checks.
To provide a bit more detail, in the first case above, I see the following results in the HTTP API:
$ curl http://localhost:8500/v1/agent/services?pretty=true
{
"icejobsservice": {
"ID": "icejobsservice",
"Service": "icejobsservice",
"Tags": [
"dev"
],
"Address": "",
"Port": 8000
}
}
$ curl http://localhost:8500/v1/agent/checks?pretty=true
{}
This seems to work as well, even if the service
and check
are in same file.
{
"service": {
"name": "service_id",
"tags": ["tag"],
"port": 80
},
"check": {
"id" : "check_id",
"name" : "service_id http check",
"http": "http://localhost:80",
"interval": "10s",
"service_id": "service_id"
}
}
Fixed in 3c85d7e! The problem was that we weren't reusing our own check validation function for the embedded check definitions. Thanks for the reports!
Attempting to use the new HTTP check syntax, I first used the inline syntax as that feels more natural for my use-case:
This doesn't appear to work, but this does:
Is this a bug, an error of omission, or an error on my part?