Repository navigation
Plural/v1.0.1 - #1
Open
michaeljguarino wants to merge 6 commits into
Open
michaeljguarino wants to merge 6 commits into
michaeljguarino wants to merge 6 commits into
Conversation
Add securityContext.privileged to ActorTemplate containers. A microvm worker runs such a container with all capabilities, no masked or read-only paths, a writable cgroup2 mount and all devices, so it can run a container engine like dockerd inside its guest. The VM stays the isolation boundary. Workers run privileged actors only when their WorkerPool sets sandboxClasses[].allowPrivilegedActors (microvm only, enforced by CEL), which the controller passes as --allow-privileged-actors. Other microvm workers and gVisor workers fail the actor with FailedPrecondition. ateapi and atelet reject capabilities set next to privileged. Signed-off-by: Jonas Wrede <jonas.wrede@beyondit.gmbh> Co-authored-by: Cursor <cursoragent@cursor.com>
…witch Builds on the microVM privileged actors change so a privileged container can run rootful Docker, kind and k3s: - microVM: forward Linux.Devices to the Kata agent, and give privileged containers /dev/net/tun, /dev/fuse and /dev/kmsg. - gVisor: allowPrivilegedActors now applies to gVisor pools too. The worker boots such sandboxes with runsc --net-raw and --allow-packet-socket-write, with a writable /sys and cgroup mount. - ate-api-server and ate-controller take --disable-privileged-actors. The API server rejects new privileged templates, and the controller ignores allowPrivilegedActors on every pool. Signed-off-by: michaeljguarino <mjg@plural.sh> Co-authored-by: Cursor <cursoragent@cursor.com>
…h/substrate Skip the draft release and the site deploy outside agent-substrate/substrate. Signed-off-by: michaeljguarino <mjg@plural.sh> Co-authored-by: Cursor <cursoragent@cursor.com>
…containers A privileged container still runs its processes as the image's user, which binds ports below 1024 without CAP_NET_BIND_SERVICE. Without the sysctl a non-root server on :80 fails to bind, and the wakeup probe never succeeds. Both sysctls are per network namespace, so containers an engine starts inside keep the kernel defaults. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 0002fe4)
…cache A busy guest fills its RAM with its own page cache, so cloud-hypervisor's memfd sits at the full guest size, and the host page cache of the guest's virtio-fs writes is charged to the same cgroup. Two things went wrong: - The MemoryGuard counted the guest's memfd (shmem) as used memory, which alone put the cgroup within 1/16 of its memory.high. Any reclaim stall from the host page cache of virtio-fs writes then read as stuck, and the whole VM was killed, e.g. during a large docker build or cargo build. - The booking left ~8MiB per GiB above the guest for cloud-hypervisor and virtiofsd, and nothing for that page cache, so every write reclaimed at memory.high. MemoryWatch now takes the memory a cgroup allocates up front and can't grow past (a micro-VM's guest RAM, read from vm.info on restore) and judges only the rest against what the limit leaves it. The hard overshoot cap is unchanged, and gVisor passes none. The micro-VM actor overhead books a sixteenth of the limit on top of the guest for the host page cache, so the guest keeps its full declared size. Co-authored-by: Cursor <cursoragent@cursor.com>
The near-limit kill check left out up to the guest's declared size of all used memory, so until the guest had touched its whole RAM everything outside it (the VMM's and virtiofsd's anon and kernel memory) netted to zero, and a blowup there throttled the VM at memory.high until the hard overshoot kill instead of being caught by the stall check. Leave out only the guest RAM that is resident, the shmem the fixed size covers, and judge the rest against what the limit leaves besides the guest. A fully touched guest is judged as before. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 84027e7)
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.
Why is this needed? (Or link the issue. Open one first for features, API, install or CI changes.)
Fixes #
AI use: