diff --git a/changelog/fragments/1718268915-increase-remove-timeout.yaml b/changelog/fragments/1718268915-increase-remove-timeout.yaml new file mode 100644 index 00000000000..46369d8749c --- /dev/null +++ b/changelog/fragments/1718268915-increase-remove-timeout.yaml @@ -0,0 +1,3 @@ +kind: bug-fix +summary: Increase removal timeout when uninstall +component: "elastic-agent" diff --git a/internal/pkg/agent/install/uninstall.go b/internal/pkg/agent/install/uninstall.go index f333e8c49a5..48667154a40 100644 --- a/internal/pkg/agent/install/uninstall.go +++ b/internal/pkg/agent/install/uninstall.go @@ -168,7 +168,7 @@ func checkForUnprivilegedVault(ctx context.Context, opts ...vault.OptionFunc) (b // to an ERROR_SHARING_VIOLATION. RemovePath will retry up to 2 // seconds if it keeps getting that error. func RemovePath(path string) error { - const arbitraryTimeout = 30 * time.Second + const arbitraryTimeout = 60 * time.Second start := time.Now() var lastErr error for time.Since(start) <= arbitraryTimeout {