-
Notifications
You must be signed in to change notification settings - Fork 399
Open
Milestone
Description
Part of runc compatibilities or bug
Description
When specifying rbind,ro as mount options, the mount itself should be read-only, but it is not expected to be applied recursively as read-only.
However, in youki, it becomes read-only recursively.
see also
Steps to Reproduce
We create the mounts as a prerequisite setup.
TMP_DIR=$(mktemp -d)
TESTVOLUME="${TMP_DIR}/mounts_recursive"
sudo mount -t tmpfs none "${TESTVOLUME}"
mkdir -p ${TESTVOLUME}
sudo mount -t tmpfs none "${TESTVOLUME}"
echo "foo" > "${TESTVOLUME}/foo"
sudo mkdir -p "${TESTVOLUME}/subvol"
sudo mount -t tmpfs none "${TESTVOLUME}/subvol"
echo "bar" > "${TESTVOLUME}/subvol/bar"
setup config.json
configure mounts that use the pre-created mount as the source.
{
"destination": "/mnt",
"source": "/tmp/tmp.E1PRXLfMTc/mounts_recursive",
"options": [
"rbind",
"ro"
]
}
run youki
youki run -b tutorial/ container
In a different terminal.
This behaves as expected.
$ youki exec a touch /mnt/foo
touch: /mnt/foo: Read-only file system
This is not expected to be read-only.
$ youki exec a touch /mnt/subvol/bar
touch: /mnt/subvol/bar: Read-only file system
Additional Context
There were some mount-related fixes in v0.5.7, but this behavior existed even before that.
Metadata
Metadata
Assignees
Labels
No labels