Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: create-symlinks and update-ldcache hooks fail container create when the container rootfs is read-only

Đang mở
#2,131 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@sahanasreenath đang làm issue này rồi.

Từ ngày 9/10/2026.

  • #2132 của @sahanasreenath — đang mở

Đá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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/nvidia-container-toolkit

Tất cả issue của NVIDIA/nvidia-container-toolkit

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.