lib/deploy: Log case when auto-pruning is hopeless
authorJonathan Lebon <jonathan@jlebon.com>
Sat, 27 May 2023 14:35:12 +0000 (10:35 -0400)
committerJonathan Lebon <jonathan@jlebon.com>
Sun, 28 May 2023 22:38:53 +0000 (18:38 -0400)
For easier diagnostics.

src/libostree/ostree-sysroot-deploy.c
tests/kolainst/destructive/auto-prune.sh

index fbaf83c5b48d8a795981c323a69de98e293efe6c..7de6fdf31cc15d29d94bedf2bf9510c5891e0f53 100644 (file)
@@ -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;
     }
 
index 597da5a09426783d8c653d8db14ea71d11fa27b4..ffe86669df6a3107d47e4eb84f28e8b6fc70582b 100755 (executable)
@@ -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