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

Changing scheduling part to manage one single local storage resource #50819

Merged

Conversation

NickrenREN
Copy link
Contributor

@NickrenREN NickrenREN commented Aug 17, 2017

What this PR does / why we need it:
Finally decided to manage a single local storage resource

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): part of #50818

Special notes for your reviewer:
Since finally decided to manage a single local storage resource, remove overlay related code in scheduling part and change the name scratch to ephemeral storage.

Release note:

Changing scheduling part of the alpha feature 'LocalStorageCapacityIsolation' to manage one single local ephemeral storage resource

/assign @jingxu97
cc @ddysher

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 17, 2017
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Aug 17, 2017
@NickrenREN NickrenREN changed the title Local storage does not manage overlay any more Remove overlay related code in scheduling part Aug 17, 2017
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 17, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 17, 2017
@aveshagarwal
Copy link
Member

@kubernetes/sig-scheduling-pr-reviews

@k8s-ci-robot k8s-ci-robot added the sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. label Aug 17, 2017
@NickrenREN
Copy link
Contributor Author

@k8s-github-robot k8s-github-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 22, 2017
@NickrenREN NickrenREN force-pushed the remove-overlay-scheduler branch 2 times, most recently from 21b6992 to 67bafeb Compare August 22, 2017 06:21
@NickrenREN
Copy link
Contributor Author

/retest

@NickrenREN NickrenREN changed the title Remove overlay related code in scheduling part Changing scheduling part to manage one single local storage resource Aug 23, 2017
pod: newResourcePod(schedulercache.Resource{MilliCPU: 1, Memory: 1, StorageOverlay: 10}),
emptyDirLimit: 15,
storageMedium: v1.StorageMediumDefault,
pod: newResourcePod(schedulercache.Resource{EphemeralStorage: 25}),
Copy link
Contributor

Choose a reason for hiding this comment

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

why remove some of the tests?

Copy link
Contributor Author

@NickrenREN NickrenREN Aug 23, 2017

Choose a reason for hiding this comment

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

we manage a single resource, overlay and emptydir are not considered by predacates now, so remove them.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can still keep most of the tests with some modification. Just change overlay to ephemeralstorage with some modification. This could also help us verify the changes related to emptyDir.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have already changed overlay to ephemeral storage ,about the test case storage ephemeral local storage request exceeds allocatable
I added a fit test case about ephemeral storage, ptal, thanks

@k8s-github-robot k8s-github-robot removed the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Aug 24, 2017
@jingxu97 jingxu97 requested a review from dashpole August 24, 2017 17:41
@jingxu97
Copy link
Contributor

cc @dashpole

Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

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

lgtm

@NickrenREN
Copy link
Contributor Author

/retest

@jingxu97
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 25, 2017
@NickrenREN
Copy link
Contributor Author

/assign @timothysc

@NickrenREN
Copy link
Contributor Author

ping @timothysc for approval

@timothysc
Copy link
Member

So this needs sign off from someone from @kubernetes/sig-storage-pr-reviews and @kubernetes/sig-node-pr-reviews to +1 that this is how they plan to reference and manage now, unless there is a spec that outlines these details.

@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/node Categorizes an issue or PR as relevant to SIG Node. labels Aug 25, 2017
@NickrenREN
Copy link
Contributor Author

ping @jingxu97 @dashpole @vishh

@jingxu97
Copy link
Contributor

/approve

@timothysc
Copy link
Member

timothysc commented Aug 25, 2017

So you are outright removing scratch in favor ephemeral. I'm ok with it so long as it's spelled out in a feature somewhere. But typical policy is to support both for 1 release cycle.

Also what do you do in the case of a 1/2 upgrade.

@timothysc timothysc added this to the v1.8 milestone Aug 25, 2017
@NickrenREN
Copy link
Contributor Author

NickrenREN commented Aug 25, 2017

local isolation is alpha feature introduced in 1.7
https://github.com/kubernetes/kubernetes/blob/master/pkg/features/kube_features.go#L110

@timothysc
Copy link
Member

timothysc commented Aug 25, 2017

Could you please update your release note to include that you are removing alpha behavior in favor of the new mechanism?

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: NickrenREN, jingxu97, timothysc

Associated issue: 50818

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 25, 2017
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 51235, 50819, 51274, 50972, 50504)

@k8s-github-robot k8s-github-robot merged commit e923f2b into kubernetes:master Aug 26, 2017
@NickrenREN NickrenREN deleted the remove-overlay-scheduler branch August 26, 2017 03:07
// If the storage medium is memory, should exclude the size
for _, vol := range pod.Spec.Volumes {
if vol.EmptyDir != nil && vol.EmptyDir.Medium != v1.StorageMediumMemory {
result.StorageScratch += vol.EmptyDir.SizeLimit.Value()
Copy link
Member

Choose a reason for hiding this comment

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

does this mean the SizeLimit field is getting dropped?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, one single local ephemeral storage can be set in container's resources,

 containers:
   - name: fooa
     resources:
        requests:
  	 ephemeral-storage: “10Gi”
        limits:
  	 ephemeral-storage: “10Gi”

predicate functions take that into account and do not consider Emptydir any more.
btw: EmptyDir's sizelimit will be used by eviction manager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants