From a3c0d6a3fee7958ebfb6f8bc3c70f053be5c3085 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Sat, 27 May 2023 10:35:12 -0400 Subject: [PATCH] lib/deploy: Log case when auto-pruning is hopeless For easier diagnostics. --- src/libostree/ostree-sysroot-deploy.c | 1 + tests/kolainst/destructive/auto-prune.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index fbaf83c5..7de6fdf3 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -2578,6 +2578,7 @@ auto_early_prune_old_deployments (OstreeSysroot *self, GPtrArray *new_deployment { /* Even if we auto-pruned, the new bootdirs wouldn't fit. Just let the * code continue and let it hit ENOSPC. */ + g_printerr ("Disabling auto-prune optimization; insufficient space left in bootfs\n"); return TRUE; } diff --git a/tests/kolainst/destructive/auto-prune.sh b/tests/kolainst/destructive/auto-prune.sh index 597da5a0..ffe86669 100755 --- a/tests/kolainst/destructive/auto-prune.sh +++ b/tests/kolainst/destructive/auto-prune.sh @@ -46,6 +46,7 @@ rpm-ostree rebase :modkernel1 if OSTREE_SYSROOT_OPTS=early-prune ostree admin finalize-staged |& tee out.txt; then assert_not_reached "successfully wrote to filled up bootfs" fi +assert_file_has_content out.txt "Disabling auto-prune optimization; insufficient space left in bootfs" assert_file_has_content out.txt "No space left on device" rm out.txt unconsume_bootfs_space