From 91fa5c4880cca98b40380af338bcebc881b8a86d Mon Sep 17 00:00:00 2001 From: Cecile Robert-Michon Date: Thu, 16 Nov 2023 01:51:07 +0000 Subject: [PATCH] remove requeue when not ready --- .../controllers/dockermachinepool_controller.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller.go b/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller.go index e1f600fbb46b..ff5b23ab305a 100644 --- a/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller.go +++ b/test/infrastructure/docker/exp/internal/controllers/dockermachinepool_controller.go @@ -20,7 +20,6 @@ package controllers import ( "context" "fmt" - "time" "github.com/pkg/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -376,12 +375,12 @@ func dockerMachineToDockerMachinePool(_ context.Context, o client.Object) []ctrl return nil } -// updateStatus updates the Status field for the MachineSet +// updateStatus updates the Status field for the MachinePool object. // It checks for the current state of the replicas and updates the Status of the MachineSet. func (r *DockerMachinePoolReconciler) updateStatus(ctx context.Context, cluster *clusterv1.Cluster, machinePool *expv1.MachinePool, dockerMachinePool *infraexpv1.DockerMachinePool, dockerMachines []infrav1.DockerMachine) (ctrl.Result, error) { log := ctrl.LoggerFrom(ctx) - // List the Docker containers. This corresponds to a InfraMachinePool instance for providers. + // List the Docker containers. This corresponds to an InfraMachinePool instance for providers. labelFilters := map[string]string{dockerMachinePoolLabel: dockerMachinePool.Name} externalMachines, err := docker.ListMachinesByCluster(ctx, cluster, labelFilters) if err != nil { @@ -429,11 +428,6 @@ func (r *DockerMachinePoolReconciler) updateStatus(ctx context.Context, cluster // Aggregate the operational state of all the machines; while aggregating we are adding the // source ref (reason@machine/name) so the problem can be easily tracked down to its source machine. conditions.SetAggregate(dockerMachinePool, expv1.ReplicasReadyCondition, getters, conditions.AddSourceRef(), conditions.WithStepCounterIf(false)) - dockerMachinePool.Status.Ready = conditions.IsTrue(dockerMachinePool, expv1.ReplicasReadyCondition) - - if !dockerMachinePool.Status.Ready { - return ctrl.Result{RequeueAfter: 10 * time.Second}, nil - } return ctrl.Result{}, nil }