[Bug]: create-symlinks and update-ldcache hooks fail container create when the container rootfs is read-only
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- go, kubernetes
- Lĩnh vực
- devops, infrastructure
Hướng nghiên cứu
Start from the create-symlinks and update-ldcache subcommands of nvidia-cdi-hook and the #2026 fix for update-application-profile, which already ignores read-only filesystem errors. Check how the failing write surfaces as EROFS and whether the same handling can apply to both hooks. Pull request #2132 is already open against this issue, so review it or coordinate with its author rather than starting a second patch. Done means the container starts on a read-only rootfs without the /etc and /usr/lib64 tmpfs workaround.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Both create-symlinks and update-ldcache write into the container root filesystem. When that filesystem is read-only, the write fails with EROFS, the hook exits 1, and container creation is aborted:
Error: container create failed: error executing hook `/usr/local/nvidia/toolkit/nvidia-cdi-hook` (exit code: 1)
This is the same class of problem as #2026, which was fixed in v1.20.1 for update-application-profile by ignoring read-only filesystem errors. The other two hooks still abort.
Generalized: a CDI hook whose only effect is to modify the container root filesystem should not prevent the container from starting when that filesystem is read-only.
Steps to reproduce
$ podman run --rm --device <cdi-device> --read-only nvidia/cuda:12.6.3-base-ubuntu22.04 nvidia-smi
Error: OCI runtime error: crun: error executing hook `/usr/local/nvidia/toolkit/nvidia-cdi-hook` (exit code: 1)
$ podman run --rm --device <cdi-device> --read-only --tmpfs /etc --tmpfs /usr/lib64 nvidia/cuda:12.6.3-base-ubuntu22.04 nvidia-smi
# succeeds
Making both /etc and /usr/lib64 writable is required; making either one writable on its own still fails. Those are the two paths the generated spec's hooks write to:
- path: /usr/local/nvidia/toolkit/nvidia-cdi-hook
args: [nvidia-cdi-hook, create-symlinks, --link, libEGL_nvidia.so.595.58.03::/usr/lib64/libEGL_nvidia.so.0, ...]
- path: /usr/local/nvidia/toolkit/nvidia-cdi-hook
args: [nvidia-cdi-hook, update-ldcache, --folder, /usr/lib64, --folder, /usr/lib64/vdpau]
Impact
Kubernetes workloads that set readOnlyRootFilesystem: true cannot use GPUs. This is a common hardening requirement, and it is enforced by policy on many clusters (for example OpenShift restricted-v2 style baselines and Gatekeeper/Kyverno psp-readonlyrootfilesystem constraints), so it is not something the workload owner can simply turn off.
Environment
- nvidia-container-toolkit v1.19.0, also reproduced on v1.17.8 with regenerated CDI specs
- CRI-O and podman/crun, OpenShift 4.x, NVIDIA GPU Operator v26.3.0
- Driver 595.58.03, H100 NVL
Skipping the ldcache update does not make the libraries unreachable: they are bind-mounted into directories glibc already searches by default.
I have a patch following the same approach as the #2026 fix and will open a PR.
- Ngôn ngữ chính
- Go
- Star
- 4.6k
- Fork
- 601
- Merge trung bình
- 3 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 20
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/nvidia-container-toolkit
-
Address TODO comments in internal/platform-support/dgpu/dgpu.goCó thể đã có người làm @truongbo17 đã nhận 15 ngày trước. Đang mởdsx-ws-0930 good-first-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NVIDIA/nvidia-container-toolkit#2114 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: CDI spec WriteTo leaks the temporary descriptor on save errorsCó thể đã có người làm @git-jxj đã nhận 4 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
NVIDIA/nvidia-container-toolkit#2139 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 47/100
NVIDIA/nvidia-container-toolkit#2137 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: containerd cleanup removes imports for unrelated drop-insCó thể đã có người làm @git-jxj đã nhận 6 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
NVIDIA/nvidia-container-toolkit#2134 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
NVIDIA/nvidia-container-toolkit#2128 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NVIDIA/nvidia-container-toolkit
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
BurntSushi/toml#530 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:session-state issue-rating: 🦞 diamond lobster no-stale P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
openclaw/wacli#503 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] rmqctl error diagnostics emit terminal control charactersCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 81/100
apache/rocketmq-dashboard#6895 ·
Maintainer thường phản hồi trong vòng 3 ngày