fix(chart): create vgpu cache dirs 1777 in libsync #25
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 558 lines diff across 6 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.378
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #25"
general
weight: 0.35
archlitchi
What type of PR is this?
Bug fix. Chart-only, no new values, no image or webhook change.
What this PR does / why we need it:
The libsync DaemonSet only created
/usr/local/vgpuand copiedlibvgpu.sointo it. The two directories the webhook mounts into workload containers,{paths.containerVgpuMount}/containersand the host/tmp/vgpulock, were left to be created by the kubelet as root with mode0755, because the webhook declares both hostPaths asDirectoryOrCreate.libvgpu creates its per-container metrics cache at
{CONTAINER_VGPU_MOUNT}/containers/{POD_UID}_{CONTAINER_NAME}/usage.cacheas the workload user, so a non-root container cannot create it in a root-owned0755directory. It then fails witherrno=13and falls back to/tmp/cudevshr.cacheinside the container, wherekai-vgpu-monitornever sees it, and thehami_per-container metrics go missing for every non-root workload.This PR has the libsync script, which already runs privileged as root, create both directories at install and leave them mode
1777. It is the change proposed in https://github.com/Project-HAMi/KAI-resource-isolator/pull/22, closed unmerged on 2026-09-22 by a stale sweep with no maintainer objection.Which issue(s) this PR fixes:
Fixes #24
Special notes for your reviewer:
Scope is exactly the libsync command block. The security context, the mounts, the image,
values.yamland every other template are byte-identical tomain. No readiness probe, no mount narrowing, no new value.Verified on a single-node kind v0.32.0 cluster (Kubernetes v1.36.1, darwin/arm64) with the published image
v1.1.0, using the assertion from kai-scheduler/KAI-Scheduler#2033:| | chart at
main| with this change ||---|---|---|
|
stat -c '%n %a %U' /usr/local/vgpu/containers /tmp/vgpulock|755 rootfor both |1777 rootfor both ||
kubectl execas uid 1000:mkdir $CONTAINER_VGPU_MOUNT/containers/${POD_UID}_${CONTAINER_NAME}|Permission denied| succeeds ||
kubectl execas uid 1000:touch /tmp/vgpulock/probe|Permission denied| succeeds |An in-place
helm upgradeover a node that already had both directories at0755brings them back to1777 root, and themkdir -ppluschmodpair is idempotent across restarts. The rendered-manifest diff againstmainis confined to the six added lines of the libsync script.On
/tmp/vgpulock: at the pinned libvgpu revision5496322thetry_lock_unified_lockhelpers insrc/utils.chave no callers, so nothing writes there today. The directory is still created because the HAMi maintainer decision in kai-scheduler/KAI-Scheduler#1821 requires libsync to create it at install, and KAI #2033 asserts1777for it. The1777sticky mode is what upstream asserts and what HAMi uses for this directory.Related:
/tmp/vgpulockat install)1777)Hardware validation: no GPU was available, so everything above was validated on a GPU-less kind cluster with the non-root write path exercised directly as uid 1000. The libvgpu
errno=13log line is quoted from the real GPU node report in #22; actualhami_values throughkai-vgpu-monitorwere not measured, as that needs a GPU.Does this PR introduce a user-facing change?:
Yes, a narrow one. On every node, libsync now creates
/usr/local/vgpu/containersand/tmp/vgpulockwith mode1777at install instead of leaving them to be created0755root by the kubelet on the first scheduled pod. No values, flags, images, mounts or webhook behaviour change.AI Disclosure:
AI assistance was used to review repository context and help draft this change and its description. All changes were manually reviewed, verified locally, and submitted by the author.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Bug Fixes
The libsync DaemonSet now prepares required container and temporary directories with permissions that allow shared access.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->