fix(dra): drop redundant /sys hostPath mount breaking container start#2638
Draft
universal-itengineer wants to merge 1 commit into
Draft
fix(dra): drop redundant /sys hostPath mount breaking container start#2638universal-itengineer wants to merge 1 commit into
universal-itengineer wants to merge 1 commit into
Conversation
The virtualization-dra main container is privileged with readOnlyRootFilesystem and also bind-mounts host /sys at /sys. Under containerd this makes the runtime drop its default sysfs mount while keeping the /sys/fs/cgroup cgroup mount, which then fails because /sys/fs cannot be created on the read-only rootfs: error mounting "cgroup" to rootfs at "/sys/fs/cgroup": ... mkdirat .../rootfs/sys/fs: read-only file system A privileged container already receives a read-write /sys from the runtime (sysfs; /sys/bus/usb is populated and writable), so the explicit /sys hostPath volume is redundant. Remove the volume, its volumeMount, and the now-dead /sys entry in the SecurityPolicy hostPath allow-list. Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
virtualization-draUSB DaemonSet pods never start — they stay inCrashLoopBackOffon every node, so USB device passthrough is unavailable. The main container is privileged and runs with a read-only root filesystem while also bind-mounting the host/sys. Under containerd this combination makes the runtime fail to set up the/sys/fs/cgroupmount on the read-only rootfs, and the container never starts.A privileged container already gets a read-write
/sysfrom the runtime, so the explicit/sysmount is redundant. It is removed together with its volume and the now-dead/sysentry in the SecurityPolicy host-path allow-list.Why do we need it, and what problem does it solve?
Without this, the DRA component cannot run at all, and USB devices cannot be passed through to VMs. Verified on a cluster: a privileged pod with a read-only rootfs and an explicit
/sysmount crash-loops with the cgroup mount error, while the same pod without that mount starts fine and still has read-write access to/sys/bus/usb.What is the expected result?
virtualization-drapods reachRunningon all nodes (noCrashLoopBackOff), and USB device passthrough works.Checklist
Changelog entries