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

[pods] Consider deleted pods without spec.nodeName inactive. #2212

Merged
merged 7 commits into from
May 17, 2024

Conversation

trasc
Copy link
Contributor

@trasc trasc commented May 16, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Consider deleted pods without spec.nodeName inactive and subject for pod replacement.

Which issue(s) this PR fixes:

Fixes #2208

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Pod Integration: Consider deleted pods without `spec.nodeName` inactive and subject for pod replacement.

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. 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. labels May 16, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 16, 2024
Copy link

netlify bot commented May 16, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit ab3cfbb
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/66476b81ea0f660008870f12

@trasc
Copy link
Contributor Author

trasc commented May 16, 2024

/cc @alculquicondor

@trasc
Copy link
Contributor Author

trasc commented May 16, 2024

/test all

@trasc trasc marked this pull request as ready for review May 17, 2024 06:04
@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 May 17, 2024
pkg/controller/jobs/pod/pod_controller.go Outdated Show resolved Hide resolved
pkg/controller/jobs/pod/pod_controller.go Outdated Show resolved Hide resolved
@mimowo
Copy link
Contributor

mimowo commented May 17, 2024

IIUC the check isn't so much about "unschedulable" pods, but about pods which can never succeed. An "unscheduled" pod (without the node), which is deleted, can never be successful, so we should keep the replacement pod.

Maybe we should consider a rename runnableOrSucceeded -> canEverSucceed to better reflect the intention.

@trasc
Copy link
Contributor Author

trasc commented May 17, 2024

Maybe we should consider a rename runnableOrSucceeded -> canEverSucceed to better reflect the intention.

One can argue that the pod cannot succeed if it cannot run, additionally it very likely that runnableOrSucceeded was the result of a past debate, let's keep it as is.

Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

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

LGTM, just test-related comments

test/e2e/singlecluster/pod_test.go Outdated Show resolved Hide resolved
test/e2e/singlecluster/pod_test.go Outdated Show resolved Hide resolved
test/e2e/singlecluster/pod_test.go Outdated Show resolved Hide resolved
@trasc trasc changed the title [pods] Consider Unschedulable pods inactive. [pods] Consider deleted pods without spec.nodeName inactive. May 17, 2024
@mimowo
Copy link
Contributor

mimowo commented May 17, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 17, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7825bee9ffac2ede417bbc350f5510b55d0c4c59

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

LGTM
just a nit

test/e2e/singlecluster/pod_test.go Outdated Show resolved Hide resolved
@tenzen-y
Copy link
Member

/release-note-edit

Consider deleted pods without `spec.nodeName` inactive and subject for pod replacement.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 17, 2024
@k8s-ci-robot k8s-ci-robot requested a review from mimowo May 17, 2024 14:36
Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 17, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: d4c54364afbcc22e95783f44c46e09d60b51309f

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tenzen-y, trasc

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 17, 2024
@tenzen-y
Copy link
Member

/cherry-pick release-0.6

@k8s-infra-cherrypick-robot

@tenzen-y: once the present PR merges, I will cherry-pick it on top of release-0.6 in a new PR and assign it to you.

In response to this:

/cherry-pick release-0.6

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 merged commit e11d776 into kubernetes-sigs:main May 17, 2024
15 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.7 milestone May 17, 2024
@k8s-infra-cherrypick-robot

@tenzen-y: new pull request created: #2217

In response to this:

/cherry-pick release-0.6

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.

@alculquicondor
Copy link
Contributor

/release-note-edit

Pod Integration: Consider deleted pods without `spec.nodeName` inactive and subject for pod replacement.

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. kind/bug Categorizes issue or PR as related to a bug. 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. 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.

Deleted Pending Pods count as active in Pod Groups
7 participants