Confine workload container with SELinux instead of label=disable - #34
Confine workload container with SELinux instead of label=disable#34MiguelCarpio wants to merge 1 commit into
Conversation
Keep the vLLM container SELinux-confined and grant GPU device access via the container_use_devices boolean, rather than --security-opt=label=disable which removed confinement entirely. - default gpu_validation_workload_security_opts to "" (was label=disable) - add tasks/selinux-gpu-access.yaml to set container_use_devices, run unconditionally from main.yaml before the workload - add ansible.posix to requirements.yaml for the seboolean module Closes: OSPRH-34584 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe role now preserves SELinux confinement by default and enables persistent container access to GPU devices when SELinux is enabled. ChangesSELinux GPU access
Priority: ⬇️ Low — Defer this change because it is a narrow gpu-validation update that preserves SELinux confinement while enabling GPU device access. Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The workload remains SELinux-confined by default while configuring GPU device access before startup. No actionable merge-blocking risk remains in the supplied change context. Sequence Diagram(s)sequenceDiagram
participant GPUValidationRole
participant SELinuxFacts
participant SELinuxPolicy
GPUValidationRole->>SELinuxFacts: Gather SELinux status
SELinuxFacts-->>GPUValidationRole: Return status
GPUValidationRole->>SELinuxPolicy: Enable container_use_devices when enabled
SELinuxPolicy-->>GPUValidationRole: Persist policy change
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use Comment |
Test container_use_devices |
Keep the vLLM container SELinux-confined and grant GPU device access via the container_use_devices boolean, rather than --security-opt=label=disable which removed confinement entirely.
Closes: OSPRH-34584