From 51ca8f369b49df0051b5d41649448f9747defb41 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 7 May 2023 22:11:35 +0200 Subject: [PATCH] Do not log running out of disk space when the disk occupation is > 100%. We are seeing this with docker deployments on macOS hosts. It is a band-aid fix, however, it also seem to be the only thing we can do given that docker didn't fix this in nearly two years now. Signed-off-by: DL6ER --- src/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gc.c b/src/gc.c index 47734c110..0fbfd359d 100644 --- a/src/gc.c +++ b/src/gc.c @@ -86,9 +86,9 @@ static int check_space(const char *file, int LastUsage) // exceeds the configured threshold and current usage is higher than // usage in the last run (to prevent log spam) perc = get_filepath_usage(file, buffer); - if(perc > config.check.disk && perc > LastUsage ) + if(perc > config.check.disk && perc > LastUsage && perc <= 100.0) log_resource_shortage(-1.0, 0, -1, perc, file, buffer); - + return perc; }