DRA: export claimed CPUs to topology-aware containers #834
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 220 lines diff across 2 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.323
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #834"
general
weight: 0.35
askervin
Exporting claimed CPUs to topology-aware containers
Tenth PR of the DRA series, on top of #831. Two commits.
As requested in the #821 review,
ExportResourceData()now also exports the CPUs of the DRA claims of a container. The container finds them asCLAIMED_CPUSin/.nri-resource-policy/resources.sh, next toISOLATED_CPUS,EXCLUSIVE_CPUSandSHARED_CPUS. For example, for a container with a claim for CPUs 8-9 and a small CPU request of its own:CLAIMED_CPUSis the union of all claims of the container. The CPUs of each claim are still in theDRA_CPUSET_<claim UID>environment variables in this PR; #852, the next one, drops them, soCLAIMED_CPUSthen becomes the only place. The other variables keep listing only the container's own CPUs, so a claimed CPU that is kernel-isolated is listed only inCLAIMED_CPUS.The name is a common constant in
pkg/resmgr/policy,ExportClaimedCPUs, next to the existing ones. Balloons and template export no resource data, so they are not changed.Commits
1.
topology-aware: export the CPUs of DRA claims.2.
e2e: test exporting claimed CPUs.Extendstest42-dra-devices.Testing
TestExportClaimedCPUscovers a besteffort and an exclusive container holding a claim, and a container holding none. It also checks that the other exported CPU sets have no claimed CPUs.test42-dra-devicespasses on n4c16 with Kubernetes 1.37 and containerd v2.4.1. pod0 exports the CPUs of its claim, pod4 holds no claim and exports none, and pod7, which also has a CPU request of its own, exports its claimed CPUs and the rest of its node asSHARED_CPUS.