diff --git a/config/cluster/host.go b/config/cluster/host.go index 21fde971..6326b6b9 100644 --- a/config/cluster/host.go +++ b/config/cluster/host.go @@ -317,6 +317,7 @@ func (h *Host) WaitKubeNodeReady(node *Host) error { retry.MaxJitter(time.Second*2), retry.Delay(time.Second*3), retry.Attempts(120), + retry.LastErrorOnly(true), ) } @@ -357,6 +358,7 @@ func (h *Host) WaitHTTPStatus(url string, expected ...int) error { retry.MaxJitter(time.Second*2), retry.Delay(time.Second*3), retry.Attempts(60), + retry.LastErrorOnly(true), ) } @@ -373,6 +375,7 @@ func (h *Host) WaitK0sServiceRunning() error { retry.MaxJitter(time.Second*2), retry.Delay(time.Second*3), retry.Attempts(60), + retry.LastErrorOnly(true), ) } @@ -392,6 +395,7 @@ func (h *Host) WaitK0sServiceStopped() error { retry.MaxJitter(time.Second*2), retry.Delay(time.Second*3), retry.Attempts(60), + retry.LastErrorOnly(true), ) } diff --git a/config/cluster/k0s.go b/config/cluster/k0s.go index 2fd43b56..38fffe53 100644 --- a/config/cluster/k0s.go +++ b/config/cluster/k0s.go @@ -68,6 +68,7 @@ func (k K0s) GenerateToken(h *Host, role string, expiry time.Duration) (token st retry.MaxJitter(time.Second*2), retry.Delay(time.Second*3), retry.Attempts(60), + retry.LastErrorOnly(true), ) return } diff --git a/phase/connect.go b/phase/connect.go index 286e9ffc..2fd19c80 100644 --- a/phase/connect.go +++ b/phase/connect.go @@ -42,6 +42,7 @@ func (p *Connect) Run() error { retry.MaxJitter(time.Second*2), retry.Delay(time.Second*3), retry.Attempts(retries), + retry.LastErrorOnly(true), ) if err != nil {