Skip to content
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

AWS: Move enforcement of attached AWS device limit from kubelet to scheduler #23254

Merged

Conversation

jsafrane
Copy link
Member

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

@k8s-github-robot k8s-github-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 20, 2016
@jsafrane
Copy link
Member Author

Fixes #22994

@jsafrane
Copy link
Member Author

@justinsb @kubernetes/rh-storage, please review.

@eparis
Copy link
Contributor

eparis commented Mar 20, 2016

@jsafrane edit the original comment to include the fixes #23254 line.

@@ -1050,19 +1050,20 @@ func (self *awsInstance) getMountDevice(volumeID string, assign bool) (assigned
return mountDevice(""), false, nil
}

// Check all the valid mountpoints to see if any of them are free
valid := instanceType.getEBSMountDevices()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there another caller of getEBSMountDevices() or should you be deleting that code as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was going to say the same thing - it makes sense to inline it because the volume list is now pretty big, but do delete getEBSMountDevices

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, removed

@jsafrane jsafrane force-pushed the devel/ulimited-aws-devices branch from c2e88c4 to 37b969c Compare March 21, 2016 16:45
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 21, 2016
@jsafrane
Copy link
Member Author

TravisCI error:

Unable to find image 'gcr.io/google_containers/gen-swagger-docs:v5' locally
v5: Pulling from google_containers/gen-swagger-docs
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

Looks like flake.

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').
@jsafrane jsafrane force-pushed the devel/ulimited-aws-devices branch from 37b969c to e4dc670 Compare March 23, 2016 11:07
@jsafrane
Copy link
Member Author

@justinsb, can you please take a look?

@pmorie
Copy link
Member

pmorie commented Mar 28, 2016

cc @DirectXMan12

@justinsb justinsb added lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels May 12, 2016
@justinsb justinsb changed the title Remove limit of attached AWS devices from kubelet. AWS: Move enforcement of attached AWS device limit from kubelet to scheduler May 12, 2016
@justinsb
Copy link
Member

Sorry for the delay @jsafrane . I changed the title to be a clearer (?) release note - feel free to tweak!

@justinsb
Copy link
Member

@k8s-bot unit test this issue: #25539

@ArtfulCoder
Copy link
Contributor

@k8s-bot test this issue: #IGNORE

@k8s-bot
Copy link

k8s-bot commented May 17, 2016

GCE e2e build/test passed for commit e4dc670.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit d33fa39 into kubernetes:master May 19, 2016
@jeremyeder
Copy link

@jsafrane thank you!!! /cc @ekuric

@jsafrane jsafrane deleted the devel/ulimited-aws-devices branch August 19, 2016 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.