From b181b99fc76052aa3609252e6b61e9e509e051e5 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 19 Dec 2023 15:00:05 -0500 Subject: [PATCH] deploy: Log calculated needed space To aid debugging issues like https://github.com/coreos/fedora-coreos-tracker/issues/1637 If we're hitting this path where we think we have enough space, let's log what we calculated here to aid in diagnosing why we may later fail with ENOSPC. --- src/libostree/ostree-sysroot-deploy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index ebc0b4fcb2..1ee08700cb 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -2667,7 +2667,11 @@ auto_early_prune_old_deployments (OstreeSysroot *self, GPtrArray *new_deployment /* does the bootfs have enough free space for temporarily holding both the new * and old bootdirs? */ if (bootfs_has_space) - return TRUE; /* nothing to do! */ + { + g_autofree char *net_new_formatted = g_format_size (net_new_bootcsum_dirs_total_size); + g_print ("bootfs is sufficient for calculated new size: %s\n", net_new_formatted); + return TRUE; /* nothing to do! */ + } } /* OK, we would fail if we tried to write the new bootdirs. Is it salvageable?