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 ad89880852b..8f619b428e1 100644 --- a/internal/pkg/agent/install/uninstall.go +++ b/internal/pkg/agent/install/uninstall.go @@ -160,7 +160,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 {