From 27e28db69b9c201879b4a5317dcc1ceb29546e83 Mon Sep 17 00:00:00 2001 From: mirkoCrobu Date: Tue, 2 Dec 2025 08:59:55 +0100 Subject: [PATCH] add file lock removal --- internal/orchestrator/system_properties/properties.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/orchestrator/system_properties/properties.go b/internal/orchestrator/system_properties/properties.go index 03083d89..4e4037b2 100644 --- a/internal/orchestrator/system_properties/properties.go +++ b/internal/orchestrator/system_properties/properties.go @@ -211,6 +211,9 @@ func getLock(flock *flock.Flock, lockFn lockFunc, errorMsg string) (UnlockFunc, if err := flock.Unlock(); err != nil { return fmt.Errorf("failed to unlock file lock for %s: %w", flock.Path(), err) } + if err := os.Remove(flock.Path()); err != nil && !os.IsNotExist(err) { + slog.Warn("failed to remove lock file", "path", flock.Path(), "error", err) + } return nil }, nil }