From 91ead15283200feb9db8054a26d322fbfdc3fa59 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 28 Apr 2022 11:39:12 +0200 Subject: volume: add new option -o o=noquota add a new option to completely disable xfs quota usage for a volume. xfs quota set on a volume, even just for tracking disk usage, can cause weird errors if the volume is later re-used by a container with a different quota projid. More specifically, link(2) and rename(2) might fail with EXDEV if the source file has a projid that is different from the parent directory. To prevent such kind of issues, the volume should be created beforehand with `podman volume create -o o=noquota $ID` Closes: https://github.com/containers/podman/issues/14049 Signed-off-by: Giuseppe Scrivano --- test/test_podman_baseline.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test') diff --git a/test/test_podman_baseline.sh b/test/test_podman_baseline.sh index 5a420fe60..5ef2d1bda 100755 --- a/test/test_podman_baseline.sh +++ b/test/test_podman_baseline.sh @@ -309,6 +309,28 @@ else echo "Overlay test within limits failed" fi +before=`xfs_quota -x -c 'report -N -p' $TMPDIR | grep -c ^#` +podman $PODMANBASE volume create -o o=noquota test-no-quota +after=`xfs_quota -x -c 'report -N -p' $TMPDIR | grep -c ^#` + +if [ $before != $after ]; +then + echo "Test -o=noquota doesn't create a projid failed" +else + echo "Test -o=noquota doesn't create a projid passed" +fi + +before=`xfs_quota -x -c 'report -N -p' $TMPDIR | grep -c ^#` +podman $PODMANBASE volume create -o test-no-quota +after=`xfs_quota -x -c 'report -N -p' $TMPDIR | grep -c ^#` + +if [ $before == $after ]; +then + echo "Test without -o=noquota creates a projid failed" +else + echo "Test without -o=noquota creates a projid passed" +fi + ######## # Expected to fail ######## -- cgit v1.2.3-54-g00ecf