OCPBUGS-74970: Fix kubelet certificate wait loop in criometricsproxy.yaml #6125
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.64) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.64 · 314 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.344
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.064
Real PR Conversation Timeline
1 comments
"Review active on #6125"
general
weight: 0.35
aksjadha
<!--
If this is a bug fix, make sure your description includes "Fixes: #xxxx", or
"Closes: #xxxx"
Please provide the following information:
-->
[ -n "$(test -e ...)" ]always evaluated to false becausetest -eproduces no stdout output — it communicates via exit code only. So-nalways evaluated to false, causing the loop to exit immediately instead of waiting for the kubelet certificate to appear.var/lib/kubeletat/var. So inside the init container, the host's/var/lib/kubelet/pki/kubelet-server-current.pemappears at/var/pki/kubelet-server-current.pem— but the script checks/var/lib/kubelet/pki/kubelet-server-current.pem, which doesn't exist at that path inside the init container.- What I did
[ ! -e /var/lib/kubelet/pki/kubelet-server-current.pem ], which properly loops until the kubelet certificate file exists/var/lib/kubeletfrom/varto match main container so the script's path/var/lib/kubelet/pki/kubelet-server-current.pemresolves correctly.- How to verify it
kube-rbac-proxy-crio-ippod logs in namespaceopenshift-machine-config-operatorto verify the CRI-O metrics proxy init container correctly waits for the kubelet certificate before proceeding- Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->
criometricsproxy.yamlacross all node roles (arbiter, master, worker)[ -n "$(test -e /var/lib/kubelet/pki/kubelet-server-current.pem)" ]was incorrect. Replaced with the correct condition[ ! -e /var/lib/kubelet/pki/kubelet-server-current.pem ], which properly loops until the kubelet certificate file exists<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Bug Fixes
Ensures arbiter, master, and worker nodes now reliably wait for the kubelet server certificate/key to appear before starting dependent pods, improving startup stability and preventing race conditions during node initialization.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->