Extend functionality to deserialize rootfs upper layer of an arbitrary container to a tar archive.#12415
Conversation
bb90917 to
6baf6e9
Compare
|
Hi @ayushr2 - just making sure this doesn't fall between the cracks (it is the 2nd part of the already merged container rootfs snapshotting MR you merged). |
|
@benldrmn I think rootfs snapshot deserialization is already support for multi-container. 3eb1b76 (the PR you linked) added functionality in tmpfs to deserialize from TAR but did not add any runsc API to utilize that. In a730d6c, we added the necessary plumbing. In multi-container setup, like k8s, each container within the Pod has its own container spec. So each container can set its own gvisor/runsc/sandbox/sandbox.go Lines 459 to 476 in 428bb2a This feature already exists. |
Right, I might have "oversold" the deserialize functionality in this PR, I think the main contribution is allowing to specify different rootfs paths for different containers in the pod with the newly added |
|
Ah you are probably using Pod annotations, which are copied across all container's OCI specs. But theoretically, different containers in a Pod can have different annotations. So you can set |
|
AFAIK k8s only allows setting Pod annotations, there’s no way to annotate
specific containers
…On Wed, 14 Jan 2026 at 0:56 Ayush Ranjan ***@***.***> wrote:
*ayushr2* left a comment (google/gvisor#12415)
<#12415 (comment)>
Ah you are probably using Pod annotations, which are copied across all
container's OCI specs.
But theoretically, different containers in a Pod can have different
annotations. So you can set dev.gvisor.tar.rootfs.upper on each container
in a Pod with different values. We do that sometimes in our shim. But I
assume that's not an option for you?
—
Reply to this email directly, view it on GitHub
<#12415 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AELDOAIMDQDOPMTON6KZ2CT4GVZ2NAVCNFSM6AAAAACQGD7436VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTONBWHEZTINBQGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
@ayushr2 thanks - addressed all of your comments in my latest commit. I haven't squashed it yet to ease the review / clearer diff - let me know if you prefer me always squashing to a single commit, even during review. |
|
Also please squash your commits: Lines 95 to 99 in e0a2f60 |
db05e64 to
bf993c7
Compare
…y container to a tar archive. #12119 implemented [rootfs snapshotting](https://gvisor.dev/docs/user_guide/rootfs_snapshot/) deserialization (restore) for single-container sandboxes only. This PR extends this functionality to any container, including containers that are part of a multi-container sandbox. builds on top of: #12411 FUTURE_COPYBARA_INTEGRATE_REVIEW=#12415 from benldrmn:feat/restore-rootfs-specific-container bf993c7 PiperOrigin-RevId: 856830229
…y container to a tar archive. #12119 implemented [rootfs snapshotting](https://gvisor.dev/docs/user_guide/rootfs_snapshot/) deserialization (restore) for single-container sandboxes only. This PR extends this functionality to any container, including containers that are part of a multi-container sandbox. builds on top of: #12411 FUTURE_COPYBARA_INTEGRATE_REVIEW=#12415 from benldrmn:feat/restore-rootfs-specific-container bf993c7 PiperOrigin-RevId: 856830229
#12119 implemented rootfs snapshotting deserialization (restore) for single-container sandboxes only.
This PR extends this functionality to any container, including containers that are part of a multi-container sandbox.
builds on top of: #12411