Skip to content

fix: run perf-node-gather-daemonset container as root - #551

Open
cragr wants to merge 1 commit into
openshift:mainfrom
cragr:fix/perf-node-gather-daemonset-root
Open

fix: run perf-node-gather-daemonset container as root#551
cragr wants to merge 1 commit into
openshift:mainfrom
cragr:fix/perf-node-gather-daemonset-root

Conversation

@cragr

@cragr cragr commented May 20, 2026

Copy link
Copy Markdown

Problem

The node-probe container in perf-node-gather-daemonset mounts /var/lib/kubelet/pod-resources via hostPath and connects to kubelet.sock to collect pod resource metrics (CPU/memory allocations per pod). The socket is owned by root and is not group- or world-readable, so a non-root container process receives:

rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /host/podresources/kubelet.sock: connect: permission denied"

This error is non-fatal — the gather continues — but pod resource metrics are silently missing from the must-gather bundle.

Fix

Add securityContext: runAsUser: 0 to the node-probe container so it runs as UID 0 and can open the kubelet socket.

Testing

Tested on a 5-node OCP cluster using the must-gather-operator. Before this fix all 5 daemonset pods logged the kubelet.sock: connect: permission denied error. After this fix the gather runs clean with no socket errors and pod resource data is present in the bundle.

The node-probe container mounts /var/lib/kubelet/pod-resources via hostPath
and accesses kubelet.sock to collect pod resource data. The socket is owned
by root and not group-readable, so the container must run as UID 0.

Without runAsUser: 0 the container receives:
  rpc error: code = Unavailable desc = connection error: desc =
  "transport: Error while dialing: dial unix
  /host/podresources/kubelet.sock: connect: permission denied"

and pod resource metrics are missing from the must-gather bundle.
@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@cragr has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 55 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a21c9163-e8a3-4c0e-a1b3-80595e9b4f3d

📥 Commits

Reviewing files that changed from the base of the PR and between 37e5da5 and 05f3cce.

📒 Files selected for processing (1)
  • collection-scripts/gather_ppc
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
openshift-ci Bot requested review from ingvagabund and sferich888 May 20, 2026 04:26
@openshift-ci

openshift-ci Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cragr
Once this PR has been reviewed and has the lgtm label, please assign sferich888 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 20, 2026
@openshift-ci

openshift-ci Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Hi @cragr. Thanks for your PR.

I'm waiting for a openshift 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.

Details

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant