From ee158449ac8cc70708a161cd36845f57b5a248f1 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Tue, 6 Sep 2022 14:25:36 -0400 Subject: [PATCH] 17344: Log when removing stale crunch-run-broken file. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- lib/cloud/loopback/loopback.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cloud/loopback/loopback.go b/lib/cloud/loopback/loopback.go index 9b71c9f162..fb7a35beae 100644 --- a/lib/cloud/loopback/loopback.go +++ b/lib/cloud/loopback/loopback.go @@ -64,7 +64,9 @@ func (is *instanceSet) Create(it arvados.InstanceType, _ cloud.ImageID, tags clo // destroy+create cycle doesn't fix whatever was broken -- but // nothing else will either, so the best we can do is remove // the "broken" flag and try again. - if err := os.Remove("/var/lock/crunch-run-broken"); err != nil && !errors.Is(err, os.ErrNotExist) { + if err := os.Remove("/var/lock/crunch-run-broken"); err == nil { + is.logger.Info("removed /var/lock/crunch-run-broken") + } else if !errors.Is(err, os.ErrNotExist) { return nil, err } u, err := user.Current() -- 2.30.2