From a818055b59d2243d19bdedb4c6ae74a5deb982bf Mon Sep 17 00:00:00 2001 From: Danil-Grigorev Date: Thu, 23 Jul 2020 17:00:35 +0200 Subject: [PATCH] Increase timeout for machineSet readiness (Azure) --- pkg/framework/framework.go | 7 ++++--- pkg/framework/machinesets.go | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pkg/framework/framework.go b/pkg/framework/framework.go index 388c0456a..dad3a6f57 100644 --- a/pkg/framework/framework.go +++ b/pkg/framework/framework.go @@ -42,9 +42,10 @@ const ( ) var ( - WaitShort = 1 * time.Minute - WaitMedium = 3 * time.Minute - WaitLong = 15 * time.Minute + WaitShort = 1 * time.Minute + WaitMedium = 3 * time.Minute + WaitLong = 15 * time.Minute + WaitOverLong = 30 * time.Minute ) // DeleteObjectsByLabels list all objects of a given kind by labels and deletes them. diff --git a/pkg/framework/machinesets.go b/pkg/framework/machinesets.go index f900efc36..a2b649b10 100644 --- a/pkg/framework/machinesets.go +++ b/pkg/framework/machinesets.go @@ -308,15 +308,16 @@ func WaitForMachineSet(c client.Client, name string) { replicas := pointer.Int32PtrDerefOr(machineSet.Spec.Replicas, 0) if len(machines) != int(replicas) { - return fmt.Errorf("found %d Machines, but MachineSet has %d replicas", - len(machines), int(replicas)) + return fmt.Errorf("%q: found %d Machines, but MachineSet has %d replicas", + name, len(machines), int(replicas)) } running := FilterRunningMachines(machines) // This could probably be smarter, but seems fine for now. if len(running) != len(machines) { - return fmt.Errorf("not all Machines are running") + return fmt.Errorf("%q: not all Machines are running: %d of %d", + name, len(running), len(machines)) } for _, m := range running { @@ -331,7 +332,7 @@ func WaitForMachineSet(c client.Client, name string) { } return nil - }, WaitLong, RetryMedium).ShouldNot(HaveOccurred()) + }, WaitOverLong, RetryMedium).ShouldNot(HaveOccurred()) } // WaitForMachineSetDelete polls until the given MachineSet is not found, and