Do not make the liveness probe fail in case of network issue#7579
Merged
Do not make the liveness probe fail in case of network issue#7579
Conversation
6284408 to
78e96f0
Compare
ahmed-mez
reviewed
Mar 4, 2021
Contributor
ahmed-mez
left a comment
There was a problem hiding this comment.
the changes in pkg/autodiscovery/config_poller.go will be applied to all the config providers (kubelet, docker, ecs) while for the listeners you only updated kubelet, should we apply the same change in docker and ecs listeners ?
78e96f0 to
e3b2d29
Compare
ahmed-mez
approved these changes
Mar 4, 2021
hush-hush
approved these changes
Mar 4, 2021
This was referenced Mar 8, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Do not make the liveness probe fail in case of network issue.
Motivation
On Kubernetes, a liveness probe failure makes kubernetes restart the container.
As a consequence, the liveness probe mustn’t fail for reasons that are external to the agent.
In particular, if there is a network issue so that the agent cannot talk to the kubelet anymore, restarting the agent will not help fixing the network. So, the liveness probe mustn’t fail for that reason.
Additional Notes
We noticed that, in case of network issue, the liveness probe of the agent was flapping.
Here is the plan to fix that:
Describe your test plan
Start an agent pod and blackhole all the network traffic to/from that pod except the connections from the kubelet to the liveness and readiness probes:
Once those commands have been run on the host, after a while (depending on the liveness probe delay and #of errors), the agent pod should:
masterand the events should show that the liveness probe failed.