-
Notifications
You must be signed in to change notification settings - Fork 748
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
Update probe settings #1028
Update probe settings #1028
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think updateStrategy.rollingUpdate.maxUnavailable=10%
still requires the readiness probe to determine "Available"
Oh, you are right! We might have to revisit the time it takes though, rolling updates take a really long time currently. |
46c810c
to
2adff93
Compare
How are the new values arrived at? |
@@ -154,6 +155,7 @@ | |||
"name": "cni-bin-dir" | |||
"priorityClassName": "system-node-critical" | |||
"serviceAccountName": "aws-node" | |||
"terminationGracePeriodSeconds": 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default terminationGracePeriodSeconds
is 30 seconds. The CNI does not really need any time to shut down, so reducing this to 10s
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not zero (sigkill the pod immediately)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I did set it at 10s on purpose to avoid leaking ENIs. There is a shutdown hook and that flag is checked before trying to free or add an ENI. If the shutdown happens just when ipamd has detached an ENI, but before it has deleted it, we would "leak" it. It usually takes around 2 seconds for the detach to complete, but p99 is 10s according to EC2. Same for creating ENIs, we want the create to complete and the ENI to be attached to the node (with the delete on termination flag set) so that it gets cleaned up if the node terminates.
That said, i don't think we have done enough testing on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(:rocket: This is exactly the sort of analysis I was hoping to capture)
3d8d14a
to
3c24f2b
Compare
@@ -121,7 +121,7 @@ | |||
"command": | |||
- "/app/grpc-health-probe" | |||
- "-addr=:50051" | |||
"initialDelaySeconds": 35 | |||
"initialDelaySeconds": 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helped a lot! I tested on a cluster with 50 pods on 3 nodes:
kube-system aws-node-2ph8t 0/1 ContainerCreating 0 1s
kube-system aws-node-2ph8t 1/1 Running 0 3s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks.
@@ -154,6 +155,7 @@ | |||
"name": "cni-bin-dir" | |||
"priorityClassName": "system-node-critical" | |||
"serviceAccountName": "aws-node" | |||
"terminationGracePeriodSeconds": 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(:rocket: This is exactly the sort of analysis I was hoping to capture)
exec: { | ||
command: ["/app/grpc-health-probe", "-addr=:50051"], | ||
}, | ||
initialDelaySeconds: 60, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description says "Increase liveness polling period". I think this PR increases the liveness initial delay period however - which one was intended? (I suspect this should have been periodSeconds=60
)
(Separately) jsonnet style tip: You can "merge" values with +
. Since liveness/readiness probes are very similar, I would do this as:
livenessProbe: self.readinessProbe + {
initialDelaySeconds: 60, // If desired, but see above comment
periodSeconds: 60,
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix the comment. I think, like you said in #1028 (comment), that we should just increase the initial timeout, but keep the period at the default in order to catch issues that happen after startup faster. That should give the aws-node about 90 seconds to get started, after a 60 s startup delay and three 10 s liveness probes.
We will need to bump this time as well: amazon-vpc-cni-k8s/scripts/entrypoint.sh Lines 49 to 61 in a5d340b
|
* Reduce readiness probe startup delay * Increase liveness polling period * Reduce shutdown grace period to 10 seconds
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.