Commit 9a01e1d
committed
ci(e2e): add CentOS Stream 10 Docker/Podman/SELinux suite
PR NVIDIA#2092 adds SELinux relabeling (:z/:Z) support to the Docker and
Podman driver bind mounts, but our existing E2E lanes run inside the
Ubuntu-based ghcr.io/nvidia/openshell/ci container image, which does
not enforce SELinux. That leaves the new relabeling behavior, and any
future SELinux-sensitive change, without a host that can actually deny
a mislabeled mount.
Per the discussion on PR NVIDIA#2092 and the follow-up in NVIDIA#2093, add a
Docker/Podman/SELinux compatibility suite backed by a CentOS Stream 10
VM booted under QEMU/KVM on the existing self-hosted linux-amd64-cpu8
runner (already used by driver-vm-linux.yml with --privileged). This
needs no new runner class: it downloads a CentOS Stream 10 GenericCloud
image, seeds it with cloud-init over a generated ISO, boots it under
hardware-accelerated QEMU, and drives the guest entirely over SSH.
Unlike the earlier attempt in NVIDIA#2093, VM creation lives in a standalone
script (tasks/scripts/vm/centos-selinux-vm.sh) with create/status/ssh/
destroy subcommands instead of being embedded directly in the workflow
YAML, wired up as mise run vm:centos-selinux:*. This lets a contributor
reproduce the exact CI environment on their own machine to debug a
SELinux/bind-mount issue without needing CI access. The script caches
the downloaded base image and boots a copy-on-write overlay disk so
repeated local runs don't re-download or mutate the cached image, and
auto-detects KVM/HVF/TCG acceleration so it also runs (slowly) on
non-KVM hosts such as a contributor's Mac. It also fixes a QEMU
'-nographic cannot be used with -daemonize' incompatibility present in
the prior attempt, found by actually booting a VM with the script.
Once the guest is up, the workflow installs Docker Engine and Podman
side by side, confirms SELinux is Enforcing, runs the standard
e2e:docker and e2e:podman suites, and fails the job if the audit log
shows AVC denials during the run. It is wired in as optional/
non-blocking via a new test:e2e-centos label, matching the existing
test:e2e-kubernetes pattern.
CI.md, CONTRIBUTING.md, and architecture/build.md are updated to
document the new label and workflow.
The centos-selinux-e2e and centos-selinux-e2e-result jobs in
branch-e2e.yml unnecessarily depended on build-gateway, which the
CentOS suite never uses (it only pulls the supervisor image).
build-gateway only runs for run_core_e2e/run_kubernetes_ha_e2e, so
when a PR carries only the test:e2e-centos label, build-gateway is
skipped and GitHub's implicit success() check on needs skips
centos-selinux-e2e in turn, tripping the always()-gated result job.
Drop build-gateway from both jobs' needs so the suite runs correctly
when only test:e2e-centos is applied.
Signed-off-by: Eric Curtin <eric.curtin@docker.com>1 parent 420a855 commit 9a01e1d
8 files changed
Lines changed: 811 additions & 8 deletions
File tree
- .github/workflows
- architecture
- tasks
- scripts/vm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| 50 | + | |
48 | 51 | | |
49 | | - | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| |||
145 | 149 | | |
146 | 150 | | |
147 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
148 | 162 | | |
149 | 163 | | |
150 | 164 | | |
| |||
225 | 239 | | |
226 | 240 | | |
227 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
0 commit comments