SIGN IN SIGN UP
google / gvisor UNCLAIMED

Application Kernel for Containers

0 0 1 Go

Add regression test for opaque xattr preservation in rootfs-upper tar

The runsc tar rootfs-upper command does not preserve extended attributes
(specifically trusted.overlay.opaque) on directories. When a directory
from the lower layer is deleted and recreated, the overlay marks it as
opaque to prevent lower layer contents from showing through. Without
preserving this xattr in the tar, restoring from the snapshot causes
stale files from the lower layer to be resurrected.

This test reproduces the issue by:
1. Starting a container with overlay2 root:memory
2. Deleting /usr/share (which has files in the lower layer)
3. Recreating /usr/share with only a marker file
4. Tarring the upper layer and restoring into a new container
5. Verifying that only the marker file is visible (no stale files)
D
Daniel Norberg committed
eac475ffdc7283557b5235cbda435c0091cde4c8
Parent: eb261c6