Skip to content

Conversation

@vinaykul
Copy link
Member

@vinaykul vinaykul commented Mar 8, 2023

What type of PR is this?

/kind cleanup

What this PR does / why we need it: This change initializes pod resource allocation checkpoint manager to no-op in order to avoid accidentally introducing null pointer access if the manager functions were to be called outside of the InPlacePodVerticalScaling feature gate.

Ref: #116271 (comment)

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

I tested this by commenting out the block that allocated real pod resource allocation manager and verified local-cluster in kubeletonly mode for a single static pod. Additionally, with code committed in this PR, I verified kubeletonly mode as well as pod resize tests with local cluster. Rest is for CI.

Does this PR introduce a user-facing change? No.


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


@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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. labels Mar 8, 2023
@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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 8, 2023
@vinaykul
Copy link
Member Author

vinaykul commented Mar 8, 2023

/assign @liggitt @SergeyKanzhelev

@marquiz
Copy link
Contributor

marquiz commented Mar 8, 2023

/assign

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Could you add the reasoning from the PR description to the commit message too?

@vinaykul vinaykul force-pushed the restart-free-pod-vertical-scaling-kubelet-fix-followup branch from 8be2947 to ca52eb9 Compare March 9, 2023 15:06
Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Still nitting about the commit message 🙈 Could you wrap the commit message body and add a period to the end of the sentence?

@vinaykul vinaykul force-pushed the restart-free-pod-vertical-scaling-kubelet-fix-followup branch from ca52eb9 to 6ff9dde Compare March 9, 2023 16:24
This avoids accidentally introducing null pointer access if manager
functions were called outside of InPlacePodVerticalScaling feature gate.
@vinaykul vinaykul force-pushed the restart-free-pod-vertical-scaling-kubelet-fix-followup branch from 6ff9dde to 1e01358 Compare March 13, 2023 00:38
@vinaykul
Copy link
Member Author

ping @liggitt .. does this follow-up look good?

@liggitt
Copy link
Member

liggitt commented Mar 13, 2023

it looks reasonable to me, would like a kubelet approver to ack

@vinaykul
Copy link
Member Author

/assign @SergeyKanzhelev @Random-Liu

@vinaykul
Copy link
Member Author

/release-note-none

@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 Mar 13, 2023
@marquiz
Copy link
Contributor

marquiz commented Mar 14, 2023

/lgtm

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

LGTM label has been added.

Git tree hash: aa890cb9d5908a0100e6c9d31f9e2f9e470b7ce5

Copy link
Member

@derekwaynecarr derekwaynecarr left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm


func (m *manager) Start() {
// Initialize m.state to no-op state checkpoint manager
m.state = state.NewNoopStateCheckpoint()
Copy link
Member

Choose a reason for hiding this comment

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

nit: if we uncover more like this, it can be easier to put this in the else block below so when the feature graduates, we can be sure we just remove the else block.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: derekwaynecarr, vinaykul

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 Mar 14, 2023
@k8s-ci-robot k8s-ci-robot merged commit 2bd69db into kubernetes:master Mar 14, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.27 milestone Mar 14, 2023
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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

7 participants