Add initial Check() and Repair() methods to Stores.
Check() checks for inconsistencies between the layers which the
lower-level storage driver claims to know about and the ones which we
know we're managing. It checks that layers referenced by layers,
images, and containers are known to us and that images referenced by
containers are known to us. It checks that data which we store
alongside layers, images, and containers is still present, and to the
extent which we store other information about that data (frequenly just
the size of the data), verifies that it matches recorded expectations.
Lastly, it checks that layers which are part of images (and which we
therefore know what they should have in them) have the expected content,
and nothing else.
Repair() removes any containers, images, and layers which have any
errors associated with them. This is destructive, so its use should be
considered and deliberate.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
If STORAGE_TRANSIENT is set to 1 then transient mode will be enabled
in the tests.
Also adds overlay-transient to the cirrus CI.
Signed-off-by: Alexander Larsson <alexl@redhat.com>
This was setting the time to 1970-1-1 00:00 in the local timezone
instead of UTC which causes test failures if the local timezone has a
positive offset from UTC. Fixes#1365.
Signed-off-by: Doug Rabson <dfr@rabson.org>
All the other integration tests pass on FreeBSD with the zfs driver.
Some of them fail with the vfs driver but those also fail on Linux.
Signed-off-by: Doug Rabson <dfr@rabson.org>
It's not possible to run any of the scripts on distributions which do
have `bash` not in `/bin`. This is being fixed by using `/usr/bin/env
bash` instead.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
We want to allow tools like podman/buildah to override default storage
container mount options on a container by container basis.
For example if the default mount options for containers/storage include
nodev or nosuid, we want to allow podman to turn these off if the user
specifies --privileged.
We also might want to turn off certain user namespace flags that will cause
buildah and podman build to work slower when creating container images.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Make sure that tests for changes and diff generation include creating
subdirectories of directories that are inherited from a parent layer.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>