From 9594c081a8a6ed40635064d7156c2f98a7ee57a8 Mon Sep 17 00:00:00 2001 From: Moses Narrow Date: Sat, 13 Apr 2024 07:01:51 -0500 Subject: [PATCH] vary tick duration on self-transport error --- pkg/visor/init.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/visor/init.go b/pkg/visor/init.go index 15ceba9f86..7731e114d8 100644 --- a/pkg/visor/init.go +++ b/pkg/visor/init.go @@ -1265,6 +1265,8 @@ func initEnsureVisorIsTransportable(ctx context.Context, v *Visor, log *logging. tries++ v.isServicesHealthy.unset() log.WithError(err).Warn(fmt.Sprintf("Visor is not transportable! Attempt %v of 3", tries)) + //reduce tick duration on non nil error + ticker.Reset(time.Minute) } else { tries = 0 v.isServicesHealthy.set() @@ -1272,6 +1274,7 @@ func initEnsureVisorIsTransportable(ctx context.Context, v *Visor, log *logging. if err != nil { log.WithError(err).Warn("Failed to remove self-transport") } + ticker.Reset(tickDuration) } if tries == 3 { log.WithError(err).Error("Visor is not transportable! 3 failed attempts ; exiting now")