🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@TerryTaoYY
Copy link

@TerryTaoYY TerryTaoYY commented Dec 9, 2025

/kind bug

What this PR does / why we need it

The device taint eviction controller iterates over ResourceClaim.Status.ReservedFor
to find pod consumers. For shareable claims this list may contain multiple entries.
handlePods previously returned early when the first entry referenced a missing pod
(NotFound) or had a stale UID, which prevented processing of later consumers and
could skip eviction/cancellation decisions for other pods sharing the same claim.

This PR changes handlePods to skip stale entries and continue iterating so that
all consumers in ReservedFor are evaluated.

Which issue(s) this PR fixes

N/A

Special notes for your reviewer

  • The behavioral change is limited to handlePods iteration semantics: stale or
    mismatched ReservedFor entries no longer short-circuit processing of the rest.
  • Added regression coverage for both a missing first reservation and a UID mismatch
    ahead of another valid consumer.

Test plan

  • go test ./pkg/controller/devicetainteviction
  • go test ./pkg/controller/devicetainteviction -run TestController/evict-shared-claim

Does this PR introduce a user-facing change?

Fixed device taint eviction to continue evaluating other consumers of a shared ResourceClaim when an earlier ReservedFor entry is stale (missing pod or UID mismatch).

ResourceClaim.Status.ReservedFor may contain multiple consumers for shareable
claims. handlePods previously returned early when the first entry referenced a
missing pod (NotFound) or had a stale UID, which prevented processing of later
consumers and could skip eviction/cancellation decisions.

Update handlePods to continue iterating over ReservedFor and skip stale entries
so other consumers of the same claim are still handled.

Add regression tests covering:
- missing first reservation followed by a valid pod
- UID mismatch ahead of another valid consumer

Test: go test ./pkg/controller/devicetainteviction
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. labels Dec 9, 2025
@k8s-ci-robot
Copy link
Contributor

Please note that we're already in Test Freeze for the release-1.35 branch. This means every merged PR will be automatically fast-forwarded via the periodic ci-fast-forward job to the release branch of the upcoming v1.35.0 release.

Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Tue Dec 9 21:45:46 UTC 2025.

@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 9, 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 needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 9, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @TerryTaoYY. Thanks for your PR.

I'm waiting for a github.com 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 needs-priority Indicates a PR lacks a `priority/foo` label and requires one. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 9, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in SIG Apps Dec 9, 2025
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 9, 2025
@k8s-ci-robot k8s-ci-robot requested review from damemi and utam0k December 9, 2025 23:50
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@TerryTaoYY
Copy link
Author

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 10, 2025
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/bug Categorizes issue or PR as related to a bug. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

Status: Needs Triage
Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants