Commit Graph

13 Commits

Author SHA1 Message Date
Nalin Dahyabhai 92c4efc26e Initial implementation of consistency checks
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>
2023-04-13 10:38:24 -04:00
Giuseppe Scrivano 9b6c9b77ba tests: disable idmapping feature in overlay
that is the expectation of the tests when they check for the mapping
in the mounted layers.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-01-31 12:12:48 +01:00
Doug Rabson 1f99965a24 tests: Add a better default value for STORAGE_TRANSIENT
This was causing a bash error message:

	.../test/helpers.bash: line 10: [: : integer expression expected

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-12-13 11:37:55 +00:00
Alexander Larsson aa63ddb8dc Add test for transient mode
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>
2022-11-14 16:36:30 +01:00
Doug Rabson 60644e341d tests/helpers.bash: Fix setting the mtime to epoch in createrandom
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>
2022-09-27 13:04:20 +01:00
Doug Rabson afc8597c76 tests/idmaps.bats: only run idmaps tests on Linux
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>
2022-09-24 08:25:01 +01:00
Sascha Grunert f2c4a6eae2 Use `bash` binary from env instead of /bin/bash for scripts
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>
2020-08-17 11:23:44 +02:00
Daniel J Walsh 87880e1bf8 Allow the passing in and retrieval of mount options
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>
2018-11-19 19:14:21 -05:00
Giuseppe Scrivano 63f101dd1b tests: set mtime to the epoch
so it won't be different once added to OSTree.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-06-29 18:47:10 +02:00
Nalin Dahyabhai 7890f0fd6b Expand tests for layer changes/diffs
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>
2018-02-23 16:00:48 -05:00
Nalin Dahyabhai afeac9ed27 Add some integration tests
Try to exercise the CLI wrapper as much as we can.  It's not exhaustive,
but it's a start.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-10-04 15:14:57 -04:00
Nalin Dahyabhai 28ee01e53d Finish renaming oci-storage to containers-storage
Update the rest of the documentation, scripts, and output.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-10 16:11:09 -04:00
Nalin Dahyabhai cf1cf1df00 Replace the build system
Replace the bundle-targeted build system with simpler Makefile targets
and fewer helper scripts.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-05-25 15:50:33 -04:00