e59f7a7ace
Consul sees a healthcheck that is in the warning state as a "failed" node. This means that when we ask Consul for services that are passing, it would not return nodes that have warning healthchecks. In the cache, we only check on critical to skip for nodes. This makes the cache out of sync with the non-cache implementation. This patch reworks the non-cache implementation to ask for all nodes (even unhealthy ones) and does the same check as within the cache, skip nodes that have critical healthchecks. We've noticed this issue when we deployed custom healthchecks where the cache was acting properly, but after 1 minute we saw "None Available" errors. This is due to the TTL expiry on the cache, which is then followed by doing a non cached request. |
||
---|---|---|
.. | ||
consul | ||
mdns | ||
mock | ||
consul_registry_test.go | ||
consul_registry.go | ||
consul_watcher_test.go | ||
consul_watcher.go | ||
doc.go | ||
encoding_test.go | ||
encoding.go | ||
options.go | ||
registry.go | ||
service.go | ||
watcher.go |