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

Automated cherry pick of #117586: Add DisruptionTarget condition when preempting for critical #118221

Conversation

mimowo
Copy link
Contributor

@mimowo mimowo commented May 24, 2023

Cherry pick of #117586 on release-1.26.

#117586: Add DisruptionTarget condition when preempting for critical

For details on the cherry pick process, see the cherry pick requests page.

Add DisruptionTarget condition to the pod preempted by Kubelet to make room for a critical pod

@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone May 24, 2023
@k8s-ci-robot k8s-ci-robot added do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. 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. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels May 24, 2023
@k8s-ci-robot k8s-ci-robot added area/test sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 24, 2023
@mimowo
Copy link
Contributor Author

mimowo commented May 24, 2023

/assign @dchen1107

@mimowo
Copy link
Contributor Author

mimowo commented May 24, 2023

Note: here I had to resolve conflicts as Context wasn't passed to ginkgo test functions in 1.26. Thus, I pass the TODO context here: https://github.com/kubernetes/kubernetes/pull/118221/files#diff-94cfb00d75a10103bd0a3476b3db35446dbde4c4050913210445023abad3ae38R124. This is an analogous to the other pre-existing test in the file.

@mimowo
Copy link
Contributor Author

mimowo commented May 24, 2023

/test pull-kubernetes-e2e-kind-ipv6

@mimowo
Copy link
Contributor Author

mimowo commented May 24, 2023

/assign @bobbypage

@bart0sh
Copy link
Contributor

bart0sh commented May 25, 2023

/kind bug
/triage accepted
/priority important-soon

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels May 25, 2023
@SergeyKanzhelev
Copy link
Member

/test pull-kubernetes-node-kubelet-serial-pod-disruption-conditions

@SergeyKanzhelev
Copy link
Member

/lgtm cancel

new tests are failing. Trying the test again, but it passed on 1.27 meaning that it may be a real issue

/test pull-kubernetes-node-kubelet-serial-pod-disruption-conditions

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 26, 2023
@SergeyKanzhelev
Copy link
Member

re-run also failed. @mimowo can you please take a look?

Manually modified the commit to expect Failed phase instead of Succeeded.
This is expected in 1.26 as the code in preemption.go sets it to Failed.
In 1.27 the phase is determined by `getPhase` kubelet_pods.go based
on the completed containers.
@mimowo mimowo force-pushed the automated-cherry-pick-of-#117586-upstream-release-1.26 branch from 5d3f7fe to b935de6 Compare May 29, 2023 07:38
@mimowo
Copy link
Contributor Author

mimowo commented May 29, 2023

/pull-kubernetes-node-kubelet-serial-pod-disruption-conditions

@mimowo
Copy link
Contributor Author

mimowo commented May 29, 2023

/test pull-kubernetes-node-kubelet-serial-pod-disruption-conditions

@k8s-ci-robot
Copy link
Contributor

@mimowo: 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-kubernetes-node-kubelet-serial-pod-disruption-conditions b935de6 link false /test pull-kubernetes-node-kubelet-serial-pod-disruption-conditions

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

@mimowo
Copy link
Contributor Author

mimowo commented May 29, 2023

@SergeyKanzhelev thanks for testing, after setting the expected phase to Failed in the commit the test passed.

The test was failing as the phase expected in this test is Succeeded (on master). This is after #115331, which determines the phase based on the status of the container exit codes (

if podIsTerminal {
). In this test a sleep container is used with exits with 0 when receiving SIGTERM. Prior to that the phase was set to Failed independently of the container exit codes in
status.Phase = v1.PodFailed
.

These phase changes don't matter for adding of the condition so I think it is safe to continue with cherry-pick.

That being said, we have missed this scenario when reviewing the impacted scenarios (see release notes in #115331). Thus, I open an issue to discuss if the setting of phase is correct and clean up the code if it is: #118310

@mimowo
Copy link
Contributor Author

mimowo commented May 31, 2023

@SergeyKanzhelev
Copy link
Member

/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 31, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: ab21c8179a279d75d6df88f43a7369df1ec7fb92

@mimowo
Copy link
Contributor Author

mimowo commented May 31, 2023

/cc kubernetes/release-managers

@k8s-ci-robot k8s-ci-robot requested a review from a team May 31, 2023 16:16
Copy link

@Verolop Verolop left a comment

Choose a reason for hiding this comment

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

/lgtm

SIG Node CI/Test Board automation moved this from Archive-it to PRs - Needs Approver Jun 1, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dchen1107, mimowo, Verolop

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

@Verolop Verolop added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Jun 1, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. label Jun 1, 2023
@k8s-ci-robot k8s-ci-robot merged commit 8ed23f0 into kubernetes:release-1.26 Jun 1, 2023
17 checks passed
SIG Node CI/Test Board automation moved this from PRs - Needs Approver to Done Jun 1, 2023
SIG Node PR Triage automation moved this from Needs Reviewer to Done Jun 1, 2023
@mimowo mimowo deleted the automated-cherry-pick-of-#117586-upstream-release-1.26 branch November 29, 2023 15:02
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. area/kubelet area/test cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. 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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. 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. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Development

Successfully merging this pull request may close these issues.

None yet

7 participants