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

Add VolumeBinder to FrameworkHandle interface #86940

Merged
merged 1 commit into from Jan 9, 2020

Conversation

@skilxn-go
Copy link
Contributor

skilxn-go commented Jan 8, 2020

What type of PR is this?
/kind feature

What this PR does / why we need it:
Add VolumeBinder to FrameworkHandle interface.
When user is implementing some plugin like reserve/unreserve, current scheduler framework will tell the plugin which node is going to bind or bind failed for this pod. But we can not get any view about the pv/pvc binding information of this pod. In our use case, we use scheduler framework plugins to manage a lot of disks and ssds, so we need this information for some reserving and cleaning work when scheduling.

Meanwhile, people may use pvc/pv binding information to make some decisions during the scheduling cycle.

Which issue(s) this PR fixes:
Fixes #86906

Special notes for your reviewer:
None

Does this PR introduce a user-facing change?:

Add VolumeBinder method to FrameworkHandle interface, which allows user to get the volume binder when implementing scheduler framework plugins.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Jan 8, 2020

Welcome @skilxn-go!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Jan 8, 2020

Hi @skilxn-go. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@skilxn-go

This comment has been minimized.

Copy link
Contributor Author

skilxn-go commented Jan 8, 2020

/sig scheduling

@k8s-ci-robot k8s-ci-robot requested review from alculquicondor and k82cn Jan 8, 2020
@skilxn-go

This comment has been minimized.

Copy link
Contributor Author

skilxn-go commented Jan 8, 2020

/assign @Huang-Wei

@RA489

This comment has been minimized.

Copy link
Contributor

RA489 commented Jan 8, 2020

/ok-to-test

@skilxn-go

This comment has been minimized.

Copy link
Contributor Author

skilxn-go commented Jan 8, 2020

/retest

Copy link
Member

ahg-g left a comment

Thanks

@@ -116,6 +119,7 @@ type frameworkOptions struct {
informerFactory informers.SharedInformerFactory
snapshotSharedLister schedulerlisters.SharedLister
metricsRecorder *metricsRecorder
podBindingCache scheduling.PodBindingCache

This comment has been minimized.

Copy link
@ahg-g

ahg-g Jan 8, 2020

Member

lets pass the VolumeBinderinstead of just the cache.

@@ -158,6 +162,15 @@ func withMetricsRecorder(recorder *metricsRecorder) Option {
}
}

// WithPodBindingCache sets podBindingCache for the scheduling framework.
func WithPodBindingCache(binder *volumebinder.VolumeBinder) Option {

This comment has been minimized.

Copy link
@ahg-g

ahg-g Jan 8, 2020

Member

change to WithVolumeBinder

@@ -893,6 +907,11 @@ func (f *framework) SharedInformerFactory() informers.SharedInformerFactory {
return f.informerFactory
}

// PodBindingCache returns the pod binding cache used by scheduler.
func (f *framework) PodBindingCache() scheduling.PodBindingCache {

This comment has been minimized.

Copy link
@ahg-g

ahg-g Jan 8, 2020

Member

ditto, change to VolumeBinder()

This comment has been minimized.

Copy link
@skilxn-go

skilxn-go Jan 8, 2020

Author Contributor

all fixed 😆

@skilxn-go skilxn-go changed the title Add podBindingCache to FrameworkHandle interface Add VolumeBinder to FrameworkHandle interface Jan 8, 2020
@skilxn-go

This comment has been minimized.

Copy link
Contributor Author

skilxn-go commented Jan 8, 2020

/test pull-kubernetes-e2e-kind

@ahg-g

This comment has been minimized.

Copy link
Member

ahg-g commented Jan 8, 2020

run ./hack/update-bazel.sh to update the build files

@skilxn-go

This comment has been minimized.

Copy link
Contributor Author

skilxn-go commented Jan 9, 2020

Thanks, I don't know this tool before. I have updated build files now.

@ahg-g

This comment has been minimized.

Copy link
Member

ahg-g commented Jan 9, 2020

/lgtm
/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Jan 9, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, skilxn-go

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahg-g

This comment has been minimized.

Copy link
Member

ahg-g commented Jan 9, 2020

/retest

@skilxn-go

This comment has been minimized.

Copy link
Contributor Author

skilxn-go commented Jan 9, 2020

/test pull-kubernetes-e2e-gce

@skilxn-go

This comment has been minimized.

Copy link
Contributor Author

skilxn-go commented Jan 9, 2020

/test pull-kubernetes-e2e-kind

2 similar comments
@skilxn-go

This comment has been minimized.

Copy link
Contributor Author

skilxn-go commented Jan 9, 2020

/test pull-kubernetes-e2e-kind

@skilxn-go

This comment has been minimized.

Copy link
Contributor Author

skilxn-go commented Jan 9, 2020

/test pull-kubernetes-e2e-kind

@BenTheElder

This comment has been minimized.

Copy link
Member

BenTheElder commented Jan 9, 2020

this will probably need an additional retest to pick up a fix filed in test-infra (your last /test beat the fix merging slightly 🙃)

@ahg-g

This comment has been minimized.

Copy link
Member

ahg-g commented Jan 9, 2020

/retest

@k8s-ci-robot k8s-ci-robot merged commit edad4bb into kubernetes:master Jan 9, 2020
15 of 16 checks passed
15 of 16 checks passed
tide Not mergeable. Retesting: pull-kubernetes-e2e-kind
Details
cla/linuxfoundation skilxn-go authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-kind Job succeeded.
Details
pull-kubernetes-e2e-kind-ipv6 Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Jan 9, 2020
@skilxn-go skilxn-go mentioned this pull request Jan 30, 2020
6 of 6 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.