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

KEP-5007: DRA Device Attach Before Pod Scheduled #5012

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

KobayashiD27
Copy link

  • One-line enhancement description: Some network- or fabric-attached devices need to be attached to a node before a pod using them can be scheduled.
  • Other comments:

@k8s-ci-robot k8s-ci-robot added the kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory label Dec 20, 2024
@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 20, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @KobayashiD27. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 20, 2024
@KobayashiD27
Copy link
Author

@pohly
I have drafted the KEP. I would appreciate it if we could discuss it further.

@KobayashiD27 KobayashiD27 marked this pull request as draft December 20, 2024 07:54
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 20, 2024
@KobayashiD27 KobayashiD27 marked this pull request as ready for review December 22, 2024 23:37
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 22, 2024

In this scenario, the ResourceSlice representing a same fabric device might be selected in multiple Kubernetes clusters simultaneously. If the attachment fails in one cluster, the pod will remain in a failed state in kubelet.

By having the scheduler wait for the fabric device to be attached, we can reschedule the pod if the attachment fails. This approach is superior because it avoids unnecessary waiting and allows for immediate rescheduling.

Choose a reason for hiding this comment

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

I am new to this area of CDI, but would appreciate if we can show how this para is more tightly related to the proposal ? For example does this make it easier to attach requested resource directly to the node where the pod is about to be scheduled or some other example like https://cdi.liqid.com/hubfs/Inference-aaS-WP_FNL.pdf

Copy link
Author

Choose a reason for hiding this comment

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

In the current implementation, device attachment is executed by NodePrepareResource() after the Pod has been scheduled. However, if the device cannot be attached to the node at this stage, NodePrepareResource() will continue to fail, and the user will see the ContainerCreating state persist (internally, it will keep failing indefinitely). This issue is particularly problematic when fabric devices are shared across multiple Kubernetes clusters, as these clusters may compete for resources, leading to situations where device attachment fails.

Implementing this proposal will help avoid the persistent ContainerCreating state. By streamlining the process of attaching the requested resource directly to the node where the Pod is scheduled, the risk of device attachment failure is reduced. Consequently, this enhances the overall reliability of the system and prevents resource wastage.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: KobayashiD27
Once this PR has been reviewed and has the lgtm label, please assign ahg-g for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@KobayashiD27
Copy link
Author

Hi @pohly,
When you have a moment, could you please take a look at my proposal?

CC: @towca @hase1128
Since this is related to CA and DRA, I would appreciate it if you could also review it when you have the chance.

Thank you!

@pohly
Copy link
Contributor

pohly commented Jan 10, 2025

/ok-to-test

I'm a bit time-constrained right now. Not sure whether I can review for 1.33.

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 10, 2025
@k8s-ci-robot
Copy link
Contributor

@KobayashiD27: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-enhancements-verify 84c3d1b link true /test pull-enhancements-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory ok-to-test Indicates a non-member PR verified by an org member that is safe to test. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

4 participants