test/upgrade: correctly share mounts between host and container
A c/storage PR[1] chnage the behavior to correctly report umount errors. This is causing problem in the updgrade tests. The problem is that a cotnainer is mounted inside another container and then unmounted on the host. Therefore both operations happen in different mount namespaces. this is expcted but we want to share the mounts between them. This is the default but c/stroage make the root private by default thus the mounts were not shared. To fix this use the `skip_mount_home` storage option so the mount is kept shared. [1] https://github.com/containers/storage/pull/1607 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
444f19cb2a
commit
68183b07d6
|
|
@ -43,7 +43,9 @@ setup() {
|
|||
fi
|
||||
|
||||
# cgroup-manager=systemd does not work inside a container
|
||||
export _PODMAN_TEST_OPTS="--cgroup-manager=cgroupfs --root=$PODMAN_UPGRADE_WORKDIR/root --runroot=$PODMAN_UPGRADE_WORKDIR/runroot --tmpdir=$PODMAN_UPGRADE_WORKDIR/tmp"
|
||||
# skip_mount_home=true is required so we can share the storage mounts between host and container,
|
||||
# the default c/storage behavior is to make the mount propagation private.
|
||||
export _PODMAN_TEST_OPTS="--storage-opt=skip_mount_home=true --cgroup-manager=cgroupfs --root=$PODMAN_UPGRADE_WORKDIR/root --runroot=$PODMAN_UPGRADE_WORKDIR/runroot --tmpdir=$PODMAN_UPGRADE_WORKDIR/tmp"
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -180,7 +182,7 @@ EOF
|
|||
-v /var/lib/cni:/var/lib/cni \
|
||||
-v /etc/cni/net.d:/etc/cni/net.d \
|
||||
-v /dev/shm:/dev/shm \
|
||||
-v $pmroot:$pmroot \
|
||||
-v $pmroot:$pmroot:rshared \
|
||||
$OLD_PODMAN $pmroot/setup
|
||||
|
||||
_PODMAN_TEST_OPTS= wait_for_ready podman_parent
|
||||
|
|
|
|||
Loading…
Reference in New Issue