Skip to content

Conversation

@zhifei92
Copy link
Contributor

@zhifei92 zhifei92 commented Sep 11, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Before upgrading a pod, the kube-apiserver validates the pod using strategy.ValidateUpdate. Adding or removing containers from the pod is deemed invalid. However, strategy.PrepareForUpdate(MarkPodProposedForResize is called) is invoked prior to strategy.ValidateUpdate, causing a panic when InPlacePodVerticalScaling is enabled.

Which issue(s) this PR fixes:

Fixes #127282

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

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


@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. 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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Sep 11, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @zhifei92. 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 release-note-none Denotes a PR that doesn't merit a release note. and removed 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 Sep 11, 2024
@zhifei92
Copy link
Contributor Author

/sig api-machinery

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 11, 2024
@bouaouda-achraf
Copy link
Contributor

Should we consider adding a test case related to this issue? It could help catch it during a pipeline stage.

@seans3
Copy link
Contributor

seans3 commented Sep 12, 2024

/triage accepted
/ok-to-test

@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. triage/accepted Indicates an issue or PR is ready to be actively worked on. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed 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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 12, 2024
@zhifei92
Copy link
Contributor Author

/retest-required

1 similar comment
@zhifei92
Copy link
Contributor Author

/retest-required

@tallclair
Copy link
Member

/assign

@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: f3c6e80ae7a469cb624dffd282b4a95c1bfb7c53

@tallclair
Copy link
Member

/milestone v1.32
/priority important-soon

@k8s-ci-robot k8s-ci-robot added this to the v1.32 milestone Oct 22, 2024
@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 22, 2024
@knabben
Copy link
Member

knabben commented Oct 23, 2024

Hello @tallclair @zhifei92
The code freeze is starting 02:00 UTC Friday November 8th 2024 (about 2 weeks from now), and while there is still time, we want to ensure that each PR has a chance to be merged on time. Just a gently reminder of the date since PR is progressing.
Thank you!

@zhifei92
Copy link
Contributor Author

@tallclair Hi, can this PR be merged now?

@tallclair
Copy link
Member

Please add the comment to the validation, and fix the test names.

add unit test

refactor:  Merge the test cases into TestMarkPodProposedForResize.

chore:  Add the comment and fix the test names
@zhifei92 zhifei92 force-pushed the fix-apiserver-unexpected-panic branch from c2e043a to 5c01709 Compare October 29, 2024 02:53
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 29, 2024
@zhifei92
Copy link
Contributor Author

/test pull-kubernetes-e2e-kind

@tallclair
Copy link
Member

/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 Oct 29, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 574aee4a24ff1b959c678607c156af9f3e91248b

@tallclair
Copy link
Member

/assign @thockin
for api approval

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

Thanks!

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tallclair, thockin, zhifei92

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 Oct 29, 2024
@k8s-ci-robot k8s-ci-robot merged commit d702d26 into kubernetes:master Oct 30, 2024
14 checks passed
@zhifei92
Copy link
Contributor Author

@tallclair Hi, this issue was found in v1.31, so does this PR need to be cherry-picked to v1.31?

@tallclair
Copy link
Member

I don't think we usually backport fixes for alpha features, at least not for corner cases like this.

@zhifei92
Copy link
Contributor Author

I don't think we usually backport fixes for alpha features, at least not for corner cases like this.

get

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[FG:InPlacePodVerticalScaling] api server "INTERNAL_ERROR; received from peer" while executing kubectl replace

7 participants