warning should not be a fail status#4537
Conversation
|
Hello @trondhindenes what's your opinion about this PR ? |
|
If I understand this PR correctly, it makes the following change: Assuming I understand it correctly, I don't have an opinion - we don't use the warning status for anything internally. Traefik doesn't currently have any logic to decide routing based on the health of individual nodes in the backend (I'm pretty sure HaProxy has something like this), so for now I guess it comes down to whether or not to treat "warning" as a failure state or not. I don't really have a strong opinion, but since "warning" is a degraded state, I guess backwards compatibility should be most important (meaning this setting shouldn't be changed just like that). I guess the natural thing to do is to introduce a config setting to control the behavior of the "warning" state but keep the default as-is. That's just my two cents :-) |
|
Hi, This is the way consul manages healthyness: while a node has all its checks either passing or warning, the node is part of the service. Only when a check becomes critical or the node is in maintenance, is the node unable to serve. Since it is the way consul handles consul checks, I would say this is the way they have to be handled. So I believe this is the way traefik has to handle consul checks. Regarding backward compatibility, I would be very surprised that anyone using consul, with the way it handles checks, would be badly impacted by this pr since it reflects the expected behavior. See also #4536 Regards, |
|
Thank you for this PR. Sorry for the late answer. Could you rebase this pull request on v1.7 branch? |
30e74d1 to
813ad93
Compare
|
Hello, I have rebased on 1.7. Thank you. |
|
Hello, Any status update ? |
|
Hello @saez0pub, Sorry for the late reply. Could you please, like suggested by @trondhindenes, add a parameter to keep the default as-is. |
|
Hello, I've added an option, and tested it manually. with the option not set (by default WarningIsCritical = true)
Node Check state transition :
with the consulcatalog option WarningIsCritical = false
Node Check state transition :
This option is by default on the old behaviour. I suggest you to match consul's logic in the next major release and invert the default value of this parameter. Using a consul catalog provider and changing the healthyness detection is something hard for users comming from consul. |
I would like to have a behavior like the DNS provider of consul. Even if the service is warning, It is considered as UP. Moreover, another difference is that if any service not served by traefik is in warning state, traefik remove it from consul catalog.
If you start a service with warning status, it was not be added unless a critical status occurs If your node has a critcal service then warning, it was not added unless OK Now warning is considered as passing if the option is enabled.
I would like to have a behavior like the DNS provider of consul.
Even if the service is warning, It is considered as UP.
Moreover, another difference is that if any service not served by traefik is in warning state, traefik remove it from consul catalog.
What does this PR do?
Change failure detection for consul catalog
Motivation
A warning on a service on a node disable all frontends of this node on consul
More
Additional Notes
I have tested it manualy, I don't know what test I could write.
related to #4536