ostree/tests
Jonathan Lebon c561e6179e lib/sysroot-deploy: Add experimental support for automatic early prune
During the early design of FCOS and RHCOS, we chose a value of 384M
for the boot partition. This turned out to be too small: some arches
other than x86_64 have larger initrds, kernel binaries, or additional
artifacts (like device tree blobs). We'll likely bump the boot partition
size in the future, but we don't want to abandon all the nodes deployed
with the current size.[[1]]

Because stale entries in `/boot` are cleaned up after new entries are
written, there is a window in the update process during which the bootfs
temporarily must host all the `(kernel, initrd)` pairs for the union of
current and new deployments.

This patch determines if the bootfs is capable of holding all the
pairs. If it can't but it could hold all the pairs from just the new
deployments, the outgoing deployments (e.g. rollbacks) are deleted
*before* new deployments are written. This is done by updating the
bootloader in two steps to maintain atomicity.

Since this is a lot of new logic in an important section of the
code, this feature is gated for now behind an environment variable
(`OSTREE_ENABLE_AUTO_EARLY_PRUNE`). Once we gain more experience with
it, we can consider turning it on by default.

This strategy increases the fallibility of the update system since one
would no longer be able to rollback to the previous deployment if a bug
is present in the bootloader update logic after auto-pruning (see [[2]]
and following). This is however mitigated by the fact that the heuristic
is opportunistic: the rollback is pruned *only if* it's the only way for
the system to update.

[1]: https://github.com/coreos/fedora-coreos-tracker/issues/1247
[2]: https://github.com/ostreedev/ostree/issues/2670#issuecomment-1179341883

Closes: #2670
2023-05-01 12:12:03 -04:00
..
coccinelle Add Coccinelle usage: one for blacklisting, one for patch collection 2017-03-30 19:19:54 +00:00
gpg-verify-data tests/gpg-verify-data: Empty out trustdb.gpg 2020-01-24 13:02:09 -07:00
gpghome tests/gpghome: Create revocation certificates for keys 2020-01-24 13:02:09 -07:00
inst treegen: Require at least one mutation 2023-03-23 16:48:55 -04:00
kolainst lib/sysroot-deploy: Add experimental support for automatic early prune 2023-05-01 12:12:03 -04:00
.gitignore Add an API to verify a commit signature explicitly 2021-08-30 13:27:38 -04:00
admin-test.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
archive-test.sh Support overlayfs whiteouts on checkout 2022-09-28 12:26:31 +02:00
bare-split-xattrs-basic.tar.xz tests: move fixture to fix installed tests 2022-04-12 09:53:54 +00:00
basic-test.sh bin/show: Add options to list metadata keys 2023-02-07 22:59:30 -07:00
bootloader-entries-crosscheck.py Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
coccinelle.sh Add Coccinelle usage: one for blacklisting, one for patch collection 2017-03-30 19:19:54 +00:00
corrupt-repo-ref.js Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
fah-deltadata-new.tar.xz tests: Add a "pull-test2" that uses slightly more realistic content 2017-11-01 17:38:26 +00:00
fah-deltadata-old.tar.xz tests: Add a "pull-test2" that uses slightly more realistic content 2017-11-01 17:38:26 +00:00
get-byte-order.c tests: Assert that byte-order is swapped on LE but not BE CPUs 2018-01-04 12:32:47 +00:00
glib.supp glib.supp: Suppress g_task -> thread leaks 2016-07-28 10:10:17 +00:00
grub2-entries-crosscheck.py Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
libostreetest.c ostree: check g_setenv return value 2022-01-10 13:33:36 +00:00
libostreetest.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
libtest-core.sh tests/kolainst: Avoid recursive symlinks 2022-01-25 16:44:39 -05:00
libtest.sh tests: Ensure non-root users have access to libcap tools 2023-02-27 12:40:05 +00:00
ostree-grub-generator Introducing ostree-grub-generator 2016-04-04 14:19:35 +00:00
ostree-path-traverse.tar.gz tests: Add a test case for path traversal in a dirtree 2018-01-12 19:38:34 +00:00
ostree.supp tests: Modernize valgrind infrastructure 2016-06-09 21:10:35 +00:00
pre-endian-deltas-repo-big.tar.xz deltas: Heuristically detect endianness for older deltas 2016-02-26 08:19:01 -05:00
pre-endian-deltas-repo-little.tar.xz deltas: Heuristically detect endianness for older deltas 2016-02-26 08:19:01 -05:00
pre-signed-pull-data.tar.gz tests: Add a pre-signed-pull.sh test 2020-06-11 18:56:35 +00:00
pull-test2.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
pull-test.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
repo-finder-mount.c glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01:00
run-installed tests/inst: Make nondestructive tests runnable as unit tests 2021-04-15 12:33:34 -04:00
runkola Add new Rust-based tests 2020-05-27 21:59:23 +00:00
test-admin-deploy-2.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-deploy-bootid-gc.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-deploy-bootprefix.sh Add sysroot.bootprefix option 2022-08-31 16:30:31 -04:00
test-admin-deploy-clean.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-deploy-etcmerge-cornercases.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-deploy-grub2.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-deploy-karg.sh Teach --karg-delete option to ostree admin deploy 2022-05-19 22:50:09 +08:00
test-admin-deploy-nomerge.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-deploy-none.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-deploy-switch.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-deploy-syslinux.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-deploy-uboot.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-deploy-whiteouts.sh Support overlayfs whiteouts on checkout 2022-09-28 12:26:31 +02:00
test-admin-gpg.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-instutil-set-kargs.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-kargs.sh RFE: Add a hidden option to ostree admin kargs edit-in-place to 2022-06-23 22:31:39 +08:00
test-admin-locking.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-pull-deploy-commit.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-pull-deploy-split.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-upgrade-endoflife.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-upgrade-not-backwards.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-upgrade-systemd-update.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-admin-upgrade-unconfigured.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-archivez.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-auto-summary.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-basic-bare-split-xattrs.sh tests: Require OSTREE_TEST_SUDO to be set to use sudo 2022-11-22 10:27:28 -05:00
test-basic-c.c tests: Set size on fileinfo 2023-03-16 18:31:03 -04:00
test-basic-root.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-basic-user-only.sh lib/commit: reject empty metadata keys 2022-01-20 10:54:30 +00:00
test-basic-user.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-basic.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-bloom.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-bsdiff.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-checksum.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-cli-extensions.sh tests/test-cli-extensions: Fix with single-binary coreutils 2022-03-26 10:55:42 +01:00
test-commit-sign-sh-ext.c Strip trailing whitespace on all C files 2023-02-07 14:50:08 -07:00
test-commit-sign.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-commit-timestamp.sh tests: Handle musl's ERANGE mapping 2023-01-02 10:40:17 +00:00
test-concurrency.py Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-config.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-core.js Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-corruption.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-create-usb.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-delta-ed25519.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-delta-sign.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-delta.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-demo-buildsystem.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-export.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-find-remotes.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-fsck-collections.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-fsck-delete.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-gpg-signed-commit.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-gpg-verify-result.c ostree: check g_setenv return value 2022-01-10 13:33:36 +00:00
test-help.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-include-ostree-h.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-init-collections.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-kargs.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-keyfile-utils.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-libarchive-import.c Strip trailing whitespace on all C files 2023-02-07 14:50:08 -07:00
test-libarchive.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-local-pull-depth.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-local-pull.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-lzma.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-mock-gio.c glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01:00
test-mock-gio.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-mutable-tree.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-no-initramfs.sh *: rename master to main in tests & examples 2021-05-07 16:55:03 +02:00
test-oldstyle-partial.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-osupdate-dtb.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-ot-opt-utils.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-ot-tool-util.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-ot-unix-utils.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-parent.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pre-signed-pull.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-prune-collections.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-prune.sh ostree/prune: Calculate reachability under exclusive lock 2023-01-30 15:08:27 -05:00
test-pull2-bareuseronly.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-bare.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-bareuser.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-bareuseronly.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-basicauth.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-c.c Strip trailing whitespace on all C files 2023-02-07 14:50:08 -07:00
test-pull-collections.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-commit-only.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-contenturl.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-corruption.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-depth.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-large-metadata.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-localcache.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-metalink.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-mirror-summary.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-mirrorlist.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-override-url.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-repeated.sh Add tests for cases under random 500s 2022-11-09 11:20:10 +01:00
test-pull-resume.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-sizes.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-subpath.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-summary-caching.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-pull-summary-sigs.sh bin/remote-summary: Add options to show metadata 2023-02-07 22:59:30 -07:00
test-pull-untrusted.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-refs-collections.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-refs.sh bin/refs: Add option to print revisions 2023-02-07 22:59:30 -07:00
test-remote-add-collections.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-remote-add.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-remote-cookies.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-remote-gpg-import.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-remote-gpg-list-keys.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-remote-headers.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-remote-refs.sh bin/remote-refs: Add option to print revisions 2023-02-07 22:59:30 -07:00
test-remotes-config-dir.js Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-repo-finder-avahi.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-repo-finder-config.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-repo-finder-mount-integration.sh tests: Require OSTREE_TEST_SUDO to be set to use sudo 2022-11-22 10:27:28 -05:00
test-repo-finder-mount.c Use g_steal_fd() in preference to glnx_steal_fd() 2023-03-17 13:32:26 +00:00
test-repo.c Strip trailing whitespace on all C files 2023-02-07 14:50:08 -07:00
test-reset-nonlinear.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-rfc2616-dates.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-rofiles-fuse.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-rollsum-cli.c ostree: check g_setenv return value 2022-01-10 13:33:36 +00:00
test-rollsum.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-signed-commit.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-signed-pull-summary.sh bin/remote-summary: Add options to show metadata 2023-02-07 22:59:30 -07:00
test-signed-pull.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-sizes.js Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-summary-collections.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-summary-update.sh bin/summary: Add options to show metadata 2023-02-07 22:59:30 -07:00
test-summary-view.sh lib/repo: Add commit version metadata to summary metadata 2022-02-04 14:28:11 -07:00
test-switchroot.sh Merge pull request #1987 from akiernan/us-switchroot-tests 2020-01-16 16:47:41 +01:00
test-symbols.sh Release 2023.1 2023-02-17 11:31:27 -05:00
test-sysroot-c.c Strip trailing whitespace on all C files 2023-02-07 14:50:08 -07:00
test-sysroot.js Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
test-varint.c ostree: check g_setenv return value 2022-01-10 13:33:36 +00:00
test-xattrs.sh Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00