-
Notifications
You must be signed in to change notification settings - Fork 4k
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
vpa-recommender: Prevent nil pointer dereference
#7161
Conversation
/lgtm |
/lgtm |
@adrianmoisey: changing LGTM is restricted to collaborators In response to this:
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. |
Sounds like we'll probably want to cherrypick this into 1.2.0, right? |
Yes, it is a very subtle bug. I am sorry again. |
/cherry-pick vpa-release-1.2 |
@ialidzhikov: once the present PR merges, I will cherry-pick it on top of vpa-release-1.2 in a new PR and assign it to you. In response to this:
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. |
No worries :) A bunch of missed this in review as well. We can cut a new release with this patched in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ialidzhikov, kwiesmueller 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 |
@ialidzhikov: new pull request created: #7169 In response to this:
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. |
Tracking release in #7170. |
What type of PR is this?
/kind regression
What this PR does / why we need it:
With 628fc39 I introduced the following nil pointer dereference to VPA 1.2.0:
In
autoscaler/vertical-pod-autoscaler/pkg/recommender/input/cluster_feeder.go
Lines 233 to 237 in 3b8fdfe
for returning the err we have to use the
vpaID
var as thevpa
var will be always nil when entry with the given key does not exist in the map.Which issue(s) this PR fixes:
N/A
but see the panic above
Special notes for your reviewer:
The issue occurs when there is a VPACheckpoint and the corresponding VPA does not exists:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: