Skip to content

Correctly wrap the ErrNodeInvalidOwner error#8611

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
adrianmoisey:fix-messages
Oct 5, 2025
Merged

Correctly wrap the ErrNodeInvalidOwner error#8611
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
adrianmoisey:fix-messages

Conversation

@adrianmoisey
Copy link
Copy Markdown
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

This suppresses the errors similar to this:

api.go:175] "Failed to get parent controller for pod" err="unhandled targetRef v1 / Node / kind-control-plane, last error node is not a valid owner" pod="kube-system/kube-apiserver-kind-control-plane"

This was mostly fixed in #7632, but the error wrapping wasn't done correctly.
This PR fixes that error wrapping.

Which issue(s) this PR fixes:

Fixes #8461

Special notes for your reviewer:

Does this PR introduce a user-facing change?

vpa-updater and vpa-admission-controller no longer excessively log fail to get pod controller: (...) last error node is not a valid owner

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


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area Indicates that a PR should not merge because it lacks an area label. labels Oct 5, 2025
@k8s-ci-robot k8s-ci-robot added area/vertical-pod-autoscaler Issues or PRs related to the Vertical Pod Autoscaler component approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed do-not-merge/needs-area Indicates that a PR should not merge because it lacks an area label. labels Oct 5, 2025
}
if err != nil {
return nil, fmt.Errorf("unhandled targetRef %s / %s / %s, last error %v",
return nil, fmt.Errorf("unhandled targetRef %s / %s / %s, last error %w",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

@omerap12 omerap12 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 k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 5, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianmoisey, omerap12

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 merged commit 42b5f34 into kubernetes:master Oct 5, 2025
7 of 8 checks passed
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/vertical-pod-autoscaler Issues or PRs related to the Vertical Pod Autoscaler component 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VPA updater excessive logs - Failed to get parent controller for [static] pods

3 participants