-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Make maximum number of EBS attached volumes a tunable option #22994
Comments
I have sort of proof of concept that removes any checks from kubelet. This way, only scheduler enforces limit of nr. of attached volumes to a node. And it's wrong:
Any suggestion? I'll probably restore my old patch with checking KUBE_MAX_PD_VOLS also in kubelet. |
@jsafrane can you explain the bug if we leave the kubelet code alone? is the upper bound on attachable AWS /dev/ devices always 39? Where is the second check in the kubelet? (i'm looking at: https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/aws/aws.go#L908) This spot looks like its just using a range of possible devices and not a 2nd quota check/enforcement. |
Scheduler recognizes an env. variable to tun number of EBS/PDs that can be attached to a AWS/GCE node. If it's higher than 39, any pods assigned to a node with 39 EBS volumes will fail with "Too many EBS volumes attached to node".
https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/aws/aws.go#L1064 |
I've created PR #23254, it will just attach as many volumes as scheduler wants. This can lead to more than KUBE_MAX_PD_VOLS attached to a node. I'd say it's up to any future attach controller to enforce KUBE_MAX_PD_VOLS properly. Also, we should not depend on magic env. variables. There should be clear configuration option for such values. |
Automatic merge from submit-queue AWS: Move enforcement of attached AWS device limit from kubelet to scheduler Limit of nr. of attached EBS volumes to a node is now enforced by scheduler. It can be adjusted by `KUBE_MAX_PD_VOLS` env. variable there. Therefore we don't need the same check in kubelet. If the system admin wants to attach more, we should allow it. Kubelet limit is now 650 attached volumes ('ba'..'zz'). Note that the scheduler counts only *pods* assigned to a node. When a pod is deleted and a new pod is scheduled on a node, kubelet start (slowly) detaching the old volume and (slowly) attaching the new volume. Depending on AWS speed **it may happen that more than KUBE_MAX_PD_VOLS volumes are actually attached to a node for some time!** Kubelet will clean it up in few seconds / minutes (both attach/detach is quite slow). Fixes #22994
We would like to be able to override the maximum number of EBS volumes attached to one node. It can be wrapped in warnings about non-support etc.... The purpose is to do exploratory work on that limit, without having to recompile the application.
One suitable option is mentioned by @jsafrane here: #22942 (comment)
IOW, add KUBE_MAX_PD_VOLS=200 in /etc/sysconfig/atomic-openshift-master and restart.
/cc @ekuric @justinsb
The text was updated successfully, but these errors were encountered: