From 9c92bda95b12c7c00a585778423c8ec8129465c5 Mon Sep 17 00:00:00 2001 From: Noel Georgi Date: Fri, 10 Jan 2025 19:05:11 +0530 Subject: [PATCH] fix: unable to override runtime defaults This fixes the issue when `.machine.files` using `/etc/cri/conf.d/20-customization.part` is sometimes unable to merge the values. The fix is to prefix the the files with `10-` prefix so the customization with `20-` takes precedence when merging. `gvisor-debug` is prefixed with `11-` since it should overwrite the gvisor defaults. This also fixes where the order of gvisor extensions mattered previously. Fixes: #578 Signed-off-by: Noel Georgi --- container-runtime/crun/{crun.part => 10-crun.part} | 0 container-runtime/crun/pkg.yaml | 2 +- .../gvisor-debug/{gvisor-debug.part => 11-gvisor-debug.part} | 0 container-runtime/gvisor-debug/pkg.yaml | 2 +- .../gvisor/{gvisor-kvm.part => 10-gvisor-kvm.part} | 0 container-runtime/gvisor/{gvisor.part => 10-gvisor.part} | 0 container-runtime/gvisor/pkg.yaml | 2 +- .../{kata-containers.part => 10-kata-containers.part} | 0 container-runtime/kata-containers/pkg.yaml | 2 +- container-runtime/spin/{spin.part => 10-spin.part} | 0 container-runtime/spin/pkg.yaml | 2 +- .../{stargz-snapshotter.part => 10-stargz-snapshotter.part} | 0 container-runtime/stargz-snapshotter/pkg.yaml | 2 +- container-runtime/wasmedge/{wasm.part => 10-wasm.part} | 0 container-runtime/wasmedge/pkg.yaml | 2 +- ...-container-runtime.part => 10-nvidia-container-runtime.part} | 0 .../nvidia-container-toolkit/nvidia-container-runtime/pkg.yaml | 2 +- 17 files changed, 8 insertions(+), 8 deletions(-) rename container-runtime/crun/{crun.part => 10-crun.part} (100%) rename container-runtime/gvisor-debug/{gvisor-debug.part => 11-gvisor-debug.part} (100%) rename container-runtime/gvisor/{gvisor-kvm.part => 10-gvisor-kvm.part} (100%) rename container-runtime/gvisor/{gvisor.part => 10-gvisor.part} (100%) rename container-runtime/kata-containers/{kata-containers.part => 10-kata-containers.part} (100%) rename container-runtime/spin/{spin.part => 10-spin.part} (100%) rename container-runtime/stargz-snapshotter/{stargz-snapshotter.part => 10-stargz-snapshotter.part} (100%) rename container-runtime/wasmedge/{wasm.part => 10-wasm.part} (100%) rename nvidia-gpu/nvidia-container-toolkit/nvidia-container-runtime/{nvidia-container-runtime.part => 10-nvidia-container-runtime.part} (100%) diff --git a/container-runtime/crun/crun.part b/container-runtime/crun/10-crun.part similarity index 100% rename from container-runtime/crun/crun.part rename to container-runtime/crun/10-crun.part diff --git a/container-runtime/crun/pkg.yaml b/container-runtime/crun/pkg.yaml index 94a43987..ea4f8a3b 100644 --- a/container-runtime/crun/pkg.yaml +++ b/container-runtime/crun/pkg.yaml @@ -27,7 +27,7 @@ steps: - | mkdir -p /rootfs/etc/cri/conf.d - cp /pkg/crun.part /rootfs/etc/cri/conf.d/crun.part + cp /pkg/10-crun.part /rootfs/etc/cri/conf.d/10-crun.part test: - | mkdir -p /extensions-validator-rootfs diff --git a/container-runtime/gvisor-debug/gvisor-debug.part b/container-runtime/gvisor-debug/11-gvisor-debug.part similarity index 100% rename from container-runtime/gvisor-debug/gvisor-debug.part rename to container-runtime/gvisor-debug/11-gvisor-debug.part diff --git a/container-runtime/gvisor-debug/pkg.yaml b/container-runtime/gvisor-debug/pkg.yaml index ea63f2bd..8f1df0ab 100644 --- a/container-runtime/gvisor-debug/pkg.yaml +++ b/container-runtime/gvisor-debug/pkg.yaml @@ -10,7 +10,7 @@ steps: install: - | mkdir -p /rootfs/etc/cri/conf.d - cp /pkg/gvisor-debug.part /rootfs/etc/cri/conf.d/gvisor-debug.part + cp /pkg/11-gvisor-debug.part /rootfs/etc/cri/conf.d/11-gvisor-debug.part cp /pkg/runsc.toml /rootfs/etc/cri/conf.d/runsc.toml test: - | diff --git a/container-runtime/gvisor/gvisor-kvm.part b/container-runtime/gvisor/10-gvisor-kvm.part similarity index 100% rename from container-runtime/gvisor/gvisor-kvm.part rename to container-runtime/gvisor/10-gvisor-kvm.part diff --git a/container-runtime/gvisor/gvisor.part b/container-runtime/gvisor/10-gvisor.part similarity index 100% rename from container-runtime/gvisor/gvisor.part rename to container-runtime/gvisor/10-gvisor.part diff --git a/container-runtime/gvisor/pkg.yaml b/container-runtime/gvisor/pkg.yaml index 3f9ea3cc..1eee9aa5 100644 --- a/container-runtime/gvisor/pkg.yaml +++ b/container-runtime/gvisor/pkg.yaml @@ -48,7 +48,7 @@ steps: - | mkdir -p /rootfs/etc/cri/conf.d - cp /pkg/gvisor.part /pkg/runsc.toml /pkg/gvisor-kvm.part /pkg/runsc-kvm.toml /rootfs/etc/cri/conf.d/ + cp /pkg/10-gvisor.part /pkg/runsc.toml /pkg/10-gvisor-kvm.part /pkg/runsc-kvm.toml /rootfs/etc/cri/conf.d/ test: - | mkdir -p /extensions-validator-rootfs diff --git a/container-runtime/kata-containers/kata-containers.part b/container-runtime/kata-containers/10-kata-containers.part similarity index 100% rename from container-runtime/kata-containers/kata-containers.part rename to container-runtime/kata-containers/10-kata-containers.part diff --git a/container-runtime/kata-containers/pkg.yaml b/container-runtime/kata-containers/pkg.yaml index a9a5a106..af035ed4 100644 --- a/container-runtime/kata-containers/pkg.yaml +++ b/container-runtime/kata-containers/pkg.yaml @@ -61,7 +61,7 @@ steps: cp containerd-shim-kata-v2 /rootfs/usr/local/bin/containerd-shim-kata-v2 - | mkdir -p /rootfs/etc/cri/conf.d - cp /pkg/kata-containers.part /rootfs/etc/cri/conf.d/kata-containers.part + cp /pkg/10-kata-containers.part /rootfs/etc/cri/conf.d/10-kata-containers.part mkdir -p /rootfs/usr/local/share/kata-containers cp /pkg/configuration.toml /rootfs/usr/local/share/kata-containers/configuration.toml diff --git a/container-runtime/spin/spin.part b/container-runtime/spin/10-spin.part similarity index 100% rename from container-runtime/spin/spin.part rename to container-runtime/spin/10-spin.part diff --git a/container-runtime/spin/pkg.yaml b/container-runtime/spin/pkg.yaml index 99829e39..1affb059 100644 --- a/container-runtime/spin/pkg.yaml +++ b/container-runtime/spin/pkg.yaml @@ -26,7 +26,7 @@ steps: tar xf containerd-shim-spin.tar.gz -C /rootfs/usr/local/bin - | mkdir -p /rootfs/etc/cri/conf.d - cp /pkg/spin.part /rootfs/etc/cri/conf.d/spin.part + cp /pkg/10-spin.part /rootfs/etc/cri/conf.d/10-spin.part test: - | mkdir -p /extensions-validator-rootfs diff --git a/container-runtime/stargz-snapshotter/stargz-snapshotter.part b/container-runtime/stargz-snapshotter/10-stargz-snapshotter.part similarity index 100% rename from container-runtime/stargz-snapshotter/stargz-snapshotter.part rename to container-runtime/stargz-snapshotter/10-stargz-snapshotter.part diff --git a/container-runtime/stargz-snapshotter/pkg.yaml b/container-runtime/stargz-snapshotter/pkg.yaml index acf256cc..8d48f105 100644 --- a/container-runtime/stargz-snapshotter/pkg.yaml +++ b/container-runtime/stargz-snapshotter/pkg.yaml @@ -43,7 +43,7 @@ steps: chmod +x /rootfs/usr/local/lib/containers/stargz-snapshotter/ctr-remote - | mkdir -p /rootfs/etc/cri/conf.d - cp /pkg/stargz-snapshotter.part /rootfs/etc/cri/conf.d/stargz-snapshotter.part + cp /pkg/10-stargz-snapshotter.part /rootfs/etc/cri/conf.d/10-stargz-snapshotter.part mkdir -p /rootfs/usr/local/etc/containerd-stargz-grpc cp /pkg/config.toml /rootfs/usr/local/etc/containerd-stargz-grpc/config.toml diff --git a/container-runtime/wasmedge/wasm.part b/container-runtime/wasmedge/10-wasm.part similarity index 100% rename from container-runtime/wasmedge/wasm.part rename to container-runtime/wasmedge/10-wasm.part diff --git a/container-runtime/wasmedge/pkg.yaml b/container-runtime/wasmedge/pkg.yaml index 027ce5d0..559e0809 100644 --- a/container-runtime/wasmedge/pkg.yaml +++ b/container-runtime/wasmedge/pkg.yaml @@ -24,7 +24,7 @@ steps: mkdir -p /rootfs/usr/local/bin mkdir -p /rootfs/etc/cri/conf.d - cp /pkg/wasm.part /rootfs/etc/cri/conf.d/wasm.part + cp /pkg/10-wasm.part /rootfs/etc/cri/conf.d/10-wasm.part tar xf containerd-shim-wasmedge.tar.gz -C /rootfs/usr/local/bin test: diff --git a/nvidia-gpu/nvidia-container-toolkit/nvidia-container-runtime/nvidia-container-runtime.part b/nvidia-gpu/nvidia-container-toolkit/nvidia-container-runtime/10-nvidia-container-runtime.part similarity index 100% rename from nvidia-gpu/nvidia-container-toolkit/nvidia-container-runtime/nvidia-container-runtime.part rename to nvidia-gpu/nvidia-container-toolkit/nvidia-container-runtime/10-nvidia-container-runtime.part diff --git a/nvidia-gpu/nvidia-container-toolkit/nvidia-container-runtime/pkg.yaml b/nvidia-gpu/nvidia-container-toolkit/nvidia-container-runtime/pkg.yaml index bf169ac2..8418c740 100644 --- a/nvidia-gpu/nvidia-container-toolkit/nvidia-container-runtime/pkg.yaml +++ b/nvidia-gpu/nvidia-container-toolkit/nvidia-container-runtime/pkg.yaml @@ -51,7 +51,7 @@ steps: done - | mkdir -p /rootfs/etc/cri/conf.d - cp /pkg/nvidia-container-runtime.part /rootfs/etc/cri/conf.d/nvidia-container-runtime.part + cp /pkg/10-nvidia-container-runtime.part /rootfs/etc/cri/conf.d/10-nvidia-container-runtime.part mkdir -p /rootfs/usr/local/etc/nvidia-container-runtime cp /pkg/nvidia-container-runtime.toml /rootfs/usr/local/etc/nvidia-container-runtime/config.toml