From 7fcdf254e9d6dfae8a2cbc315cb26a82051d2bd9 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Thu, 24 Mar 2022 04:03:48 +0100 Subject: [PATCH] marsadm: safeguard byzantine forced logrotate races --- userspace/marsadm | 1 + 1 file changed, 1 insertion(+) diff --git a/userspace/marsadm b/userspace/marsadm index 5a0cbfad..171e2aef 100755 --- a/userspace/marsadm +++ b/userspace/marsadm @@ -5941,6 +5941,7 @@ sub logrotate_res { set_link($marsadm_version, "$mars/actual-$host/marsadm-version"); if ($force) { lwarn "operation $cmd --force is DANGEROUS\n"; + sleep(3); } else { my $no_warn = ($cmd =~ /cron/); my $done = check_primary($cmd, $res, 0, 1, $no_warn);