feat(validator): verify GPU access and isolation on Slinky Slurm #3057
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 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.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3057"
general
weight: 0.35
ArangoGutierrez
Summary
Adds
slinky-slurm-gpu-access, a conformance check that proves on every GPU-backed Slinky Slurm recipe that a Slurm job allocated one GPU can use exactly that GPU, and that a job with no GPU allocation on the same Slurm node cannot open any GPU device. It replaces the "not verified" statement #2723 put on the CNCF page.Motivation / Context
secure-accelerator-accessskips on Slinky recipes (#2724), and nothing else exercised Slurm's own GPU access path:slinky-slurm-healthonly runscat /etc/os-releasein a GPU job andslinky-slurm-imex-channelchecks IMEX channel distinctness. A conformance run on a Slurm recipe could read as complete with GPU access and isolation unverified.Fixes: #2756
Related: #2723, #2724
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component/)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)validators/conformance,pkg/evidence/cncf, six Slinky overlaysImplementation Notes
/dev. Slurm isolates with the cgroup device controller (ConstrainDevices=yesplustask/cgroup), which leaves/dev/nvidiaNlisted and refusesopen()with EPERM. Als /dev/nvidiaabsence probe, as proposed in the issue and assecure-accelerator-accessuses for pods, would fail on a correctly confined cluster. The probe reports the errno of a read-only open of every GPU minor, and Go decides; any errno other than EPERM fails as inconclusive.--immediate=30 --time=1:00 --nodes=1 --ntasks=1 --cpus-per-task=1 --mem=128M, no container image). Job A (--gpus=1) must list exactly one GPU throughnvidia-smiand open exactly one minor, every other minor refused with EPERM. Job B has no GPU request and is pinned with--nodelistto job A's node, so it cannot pass by landing on a node with no GPUs; it must open no minor andnvidia-smimust list no GPU.KEY=valuefacts; every step that produces evidence (find, thenvidia-smiline split,perl) runs outside a pipeline or under its own guard, and a missingDONE=1marker, a repeated key, a hostlist node name or a dropped device line fails the check. A GPU with MIG modeEnabledfails job A (--query-gpu=uuid,mig.mode.current).task/cgroup, and the check skips on kind). The check maps onto the existingsecure_accelerator_accessrequirement, so on Slinky recipes, wheresecure-accelerator-accessskips, it alone fillssecure-accelerator-access.md.conformanceChecks()plus a test keepsmain.goand the catalog in step in both directions (an unregistered name otherwise only fails on a live cluster). A recipe test requires every GPU Slinky leaf to select the check. A test executes the probe shell with a failingfindshim, so the earlierfind | sortfail-open cannot return silently.pkg/recipe/testdata/catalog_parity_golden.yamlandpkg/bundler/testdata/stock_render_golden.yaml(bundle-info.yaml,checksums.txt,recipe.yamlper leaf).Testing
qualify_rc=0, "Codebase qualification completed". Lint:0 issues.validators/conformance57.1% -> 59.0% (+1.9%);pkg/evidence/cncf90.6% -> 90.6%;pkg/recipe90.9% -> 90.9%;pkg/validator/catalog98.1% -> 98.1%. New functions 92.3%-100% (CheckSlinkySlurmGPUAccess95.1%).| sortrestored, find guard removed, MIG rule disabled, old skip text restored,&&to||, check unregistered, check dropped from a leaf) fails a named test.slurmd-pyxisimage (Docker; the cgroup v2 device filter is the same BPF mechanism Slurm'scgroup/v2plugin uses):Risk Assessment
Rollout notes: Nothing in CI runs a Slurm recipe on real GPUs (the cloud UAT lanes are kubeflow; the kind Slurm lane has simulated GPUs and no
task/cgroup), so this stays draft until one live GPU Slinky run passes. Hypotheses that run must confirm: H1 an unallocated job's GPU minors are listed andopen()returns EPERM; H2 a--gpus=1job opens exactly one minor andnvidia-smilists one GPU; H3nvidia-smiresolves with the/usr/local/nvidiafallback on EKS, AKS and GKE COS; H5SLURMD_NODENAMEis set and accepted by--nodelist; H6--query-gpu=uuid,mig.mode.currentprints<uuid>, <mode>(H4,perlin the slurmd image, is confirmed for the pinned digest). A RED live result on some platform (for exampleAutoDetect=nvidiaunable to load NVML inside slurmd, so Slurm never learns which device files to constrain) is a real isolation finding to file, not a reason to weaken the check.Checklist
make testwith-race)make lint)git commit -S) — GPG signing info