From 0a965617920874e740b85aad7b383ea370804401 Mon Sep 17 00:00:00 2001 From: Michel Laterman <82832767+michel-laterman@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:43:14 -0700 Subject: [PATCH] Lower retry count and improve error message of uninstall notifications (#5756) --- internal/pkg/agent/install/uninstall.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/pkg/agent/install/uninstall.go b/internal/pkg/agent/install/uninstall.go index c9bd7d6b3d5..2bd3b52f727 100644 --- a/internal/pkg/agent/install/uninstall.go +++ b/internal/pkg/agent/install/uninstall.go @@ -43,7 +43,7 @@ import ( // fleetAudit variables control retry attempts for contacting fleet var ( - fleetAuditAttempts = 10 + fleetAuditAttempts = 5 fleetAuditWaitInit = time.Second fleetAuditWaitMax = time.Second * 10 ) @@ -180,7 +180,7 @@ func notifyFleetAuditUninstall(ctx context.Context, log *logp.Logger, pt *progre pt.Describe(fmt.Sprintf("notify Fleet: encountered unretryable error: %v", err)) return err } - pt.Describe(fmt.Sprintf("notify Fleet: network error, retry in %v.", jitterBackoff.NextWait())) + pt.Describe(fmt.Sprintf("notify Fleet: network error: %v (retry in %v)", err, jitterBackoff.NextWait())) jitterBackoff.Wait() continue }