test: Move from restore_dir()
to podman system reset
for user
#1598
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
restore_dir()
for podman's data directory is highly problematic:This interferes with btrfs subvolumes and overlayfs mounts, and often
causes
cp
failures likeSo move to
podman system reset
, and restore the test imageswith
podman load
for each test.Unfortunately
podman system reset
defaults to the 10 s wait timeout(containers/podman#21874), so we still need
the separate
rm --time 0
hack. But conceptually that can go away oncethat bug is fixed.
This approach would also be nice on the system podman side, but it is super
hard to get right there especially on CoreOS: There we simultaneously want a
thorough cleanup, but also rely on the running cockpit/ws container. It also
collides with the "force unmount everything below /var/lib/containers" hack
that we unfortunately still need for some OSes. But doing it for the user at
least solves half of the problem. The observed failures in the field
all occurred on the user directory, anyway.
Fixes #1591
I tried the "full" approach in #1592, with pieces of it in #1596 and #1597, but this is a mine field 😢