Uh oh!
There was an error while loading. Please reload this page.
Fix outbound socket relays for container mounts - #841
Conversation
sturdy4days
commented
Aug 27, 2026
I reviewed this against the lifecycle and relay-manager paths while tracking apple/container issue 2101. The post-start proc-PID-root direction looks like the right fix for OCI tmpfs visibility, but two issues need addressing before it is safe to merge.
Also, LinuxPod still starts outbound relays pre-process through the static rootfs path, so its parallel API retains the tmpfs failure. Please either include parity or make the scope explicit and track it separately. The existing test verifies only path construction. An end-to-end dev-shm and explicit tmpfs relay test, plus rollback coverage, would make this much easier to validate. |
EhsanAzish80
commented
Aug 27, 2026
Thanks — I addressed the review points. Outbound relays now start after the process in both LinuxContainer and LinuxPod, vminitd pins the container root descriptor for the proxy lifetime, and partial relay setup is rolled back. I also added VM integration coverage for a /dev/shm PING round trip and rollback when a later relay fails. Both integration tests and the full unit suite pass locally. |
sturdy4days
commented
Aug 27, 2026
Thanks for the follow-up. I reviewed f6d804d against the relay lifecycle paths. The update resolves the repeated PID-root lookup concern by pinning a root descriptor and adds useful LinuxContainer integration coverage, but I found two LinuxPod lifecycle gaps that still need correction before this is safe to merge.
The new LinuxContainer dev-shm PING and Nth-relay tests are a solid step, but they do not exercise these LinuxPod paths or guest-RPC failure. I would keep adoption blocked pending those fixes and runtime proof. |
sturdy4days
commented
Aug 27, 2026
Following up on the LinuxPod lifecycle gaps I reported, I prepared a non-competing signed branch rooted directly at this PR exact head f6d804d: https://github.com/sturdy4days/containerization/tree/codex/relay-lifecycle-hardening-20260827 The two commits are:
The correction records every attempted relay before setup, uses a fresh agent once close has begun, aggregates cleanup failures, and stops the VM/marks the pod errored before resource release if cleanup certainty is lost. Focused relay tests pass 8/8, the full host suite passes 601/601 across 82 suites, relevant builds and formatting pass, and the earlier pinned-root /dev/shm PING proof remains intact. Both commits are SSH-signed and GitHub reports valid signatures. An independent final source review found no confirmed lifecycle defect; remaining fault-injection gaps are limited to cleanup-error-content and secondary cleanup-failure assertions. I have not opened a competing PR. Please feel free to inspect or cherry-pick the commits; I can adapt them narrowly to your preferred structure. |
Thanks — fixed both lifecycle gaps. Socket relays are now owned per container. Failed setup rolls back the host and guest relays, terminates and deletes the process, and marks the container errored. Added VM coverage for first and later relay failures, guest RPC failure, |
sturdy4days
commented
Aug 28, 2026
Thanks for the update. I reviewed the signed ddf544f head. The nominal LinuxPod rollback, per-container relay ownership, and repeated-stop path are improved, but two failure-atomicity gaps remain before this is safe for hostile-workload adoption.
The new tests cover useful happy paths, host-path failure, and pre-proxy validation rejection, but not post-side-effect guest RPC loss or failures in host/guest stop, kill, wait, delete, agent close, or VM stop. Fault-injection coverage for those paths, plus assertions that the process, guest proxy, pinned root FD, and host listener are absent, would close the remaining gate. The non-competing correction branch at 52bfe6a demonstrates these fail-closed transitions and remains available for inspection or selective adoption. |
Summary
/proc/<pid>/rootso tmpfs and bind-mounted targets are visibleFixesapple/container#2101.
Testing
swift test --filter LinuxContainerTests(6 tests passed)swift format lint --strict --configuration .swift-format-nolint Sources/Containerization/LinuxContainer.swift Tests/ContainerizationTests/LinuxContainerTests.swiftI could not complete an end-to-end runtime check because the current
apple/containerCLI built with Xcode 27 routed commands to root help before system startup. The focused namespace-path regression and LinuxContainer suite pass.