Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

WIP: Retry pod admission when the device manager fails #131190

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

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

Conversation

endocrimes
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

Currently Pods that consume devices may fail during a node reboot due to a few different issues and races within the device plugin flow. This PR introduces a new mechanism to allow pod admission to fail rather than being a simple binary admit/reject. We then use this signal to implement a single 5s retry during the kubelet sync loop, before rejecting the pod even in the case of a retryable error (the latter part To-Still-Be-Implemented).

This is a partial improvement to the node reliability issue, with further improvements to the admission cycle requiring a KEP, but should help many cases in the meantime.

Which issue(s) this PR fixes:

Partially resolves #128043

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Updated the Kubelet to retry admission of Pods a single time when a device plugin fails to increase reliability during node reboots. 

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

/hold

Currently admission is a binary succeed/reject, but this doesn't
correctly model that admission requests can sometimes _fail_. This is
primarily true when interfacing with devices and other external
components that may be racing the Kubelet to start or recycle
configuration.

Here we introduce the concept of failure to the interface to allow for
the Kubelet to make better decisions about pod admission and retries.
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 7, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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 needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Apr 7, 2025
@endocrimes endocrimes changed the title WIP: WIP: Retry pod admission when the device manager fails. Apr 7, 2025
@k8s-ci-robot k8s-ci-robot requested review from kannon92 and klueska April 7, 2025 14:41
@endocrimes endocrimes changed the title WIP: Retry pod admission when the device manager fails. WIP: Retry pod admission when the device manager fails Apr 7, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: endocrimes
Once this PR has been reviewed and has the lgtm label, please assign tallclair 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

@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. labels Apr 7, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Apr 7, 2025
@bart0sh bart0sh moved this from Triage to Work in progress in SIG Node: code and documentation PRs Apr 7, 2025
@endocrimes endocrimes force-pushed the dani/device-manager-admit-retry branch 2 times, most recently from b31bf22 to e801b76 Compare April 8, 2025 10:19
Currently admission is a binary succeed/reject, but this doesn't correctly model that admission requests can sometimes _fail_. This is primarily true when interfacing with devices and other external components that may be racing the Kubelet to start or recycle configuration.

Here we introduce the concept of failure to scoped TM admission to allow for the Kubelet to make better decisions about pod admission and retries.
@endocrimes endocrimes force-pushed the dani/device-manager-admit-retry branch 2 times, most recently from e95a4bb to 8c6fe8b Compare April 8, 2025 14:18
This is a very coarse hack in the process of resolving kubernetes#128043

I'm not happy with the retriable error concept, or necessarily sure
about the exact paths that we want to retry. Very much open to changes
here.
@endocrimes endocrimes force-pushed the dani/device-manager-admit-retry branch from 8c6fe8b to 629fe20 Compare April 8, 2025 16:09
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Apr 8, 2025

@endocrimes: The following tests 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-kubernetes-unit-windows-master 629fe20 link false /test pull-kubernetes-unit-windows-master
pull-kubernetes-e2e-gce 629fe20 link true /test pull-kubernetes-e2e-gce

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.

@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Development

Successfully merging this pull request may close these issues.

Pods that consume "devices" via Device Plugin always fail when Node reboots even if it implements plugins_registry interface
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.