Skip to content

Commit 9f6413a

Browse files
mergify[bot]rdner
andauthored
Increase removal timeout when uninstall (#4921) (#4927)
On particularly slow machines 30 seconds might be still not enough to release the agent binary, so we're able to remove it on uninstall. This change doubles the timeout to 60 seconds. (cherry picked from commit 1f3ddcd) Co-authored-by: Denis <denis.rechkunov@elastic.co>
1 parent fdc46f3 commit 9f6413a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: bug-fix
2+
summary: Increase removal timeout when uninstall
3+
component: "elastic-agent"

internal/pkg/agent/install/uninstall.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func checkForUnprivilegedVault(ctx context.Context, opts ...vault.OptionFunc) (b
168168
// to an ERROR_SHARING_VIOLATION. RemovePath will retry up to 2
169169
// seconds if it keeps getting that error.
170170
func RemovePath(path string) error {
171-
const arbitraryTimeout = 30 * time.Second
171+
const arbitraryTimeout = 60 * time.Second
172172
start := time.Now()
173173
var lastErr error
174174
for time.Since(start) <= arbitraryTimeout {

0 commit comments

Comments
 (0)