DRA: pin containers to the claim requests they hold #835
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 191 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.315
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #835"
general
weight: 0.35
bart0sh
Pinning containers to the claim requests they hold
Until now every result of a claim set the same environment variable,
DRA_CPUSET_<claim UID>=<all CPUs of the claim>, so the policy could not tell which request of a claim a container holds. A container naming one request inresources.claims[].requestwas pinned to the CPUs of all requests of the claim.Now every CDI device of a claim sets
DRA_DEVICE_<claim UID>_<index>=<CDI device name>.dra.ContainerClaims()tells a policy which claims a container holds and which of their results, from the CDI devices of the container when the runtime reports them to NRI (containerd 2.4.1 does), and from these variables otherwise. Topology-aware pins a container to the CPUs of the results it holds. CPU accounting does not change.Topology-aware and template no longer set
DRA_CPUSET_*. A container finds its claimed CPUs asCLAIMED_CPUSin/.nri-resource-policy/resources.sh. The variable is not in any release.With a claim with requests
first(one CPU of NUMA node 0) andsecond(one CPU of node 2):| Container | Names | Runs on, and
CLAIMED_CPUS||---|---|---|
|
c0|first| CPU 2 ||
c1|second| CPU 10 ||
c2| none | CPUs 2 and 10 |Before this PR, all three ran on CPUs 2 and 10.
The first two commits are Antti's, from #828.
Tested with new unit tests and
test42-dra-deviceson n4c16 with Kubernetes 1.37 and containerd v2.4.1, which now covers a claim with two requests. Template'stest01-drapasses too, including its restart.