Skip to content

Commit

Permalink
Merge pull request #2254 from Nordix/lentzi90/fix-server-wait-for-del…
Browse files Browse the repository at this point in the history
…etion

🐛 Requeue when waiting for a server to be deleted
  • Loading branch information
k8s-ci-robot authored Nov 14, 2024
2 parents e60e656 + 0508759 commit 42aca8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/openstackmachine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const (
waitForClusterInfrastructureReadyDuration = 15 * time.Second
waitForInstanceBecomeActiveToReconcile = 60 * time.Second
waitForBuildingInstanceToReconcile = 10 * time.Second
deleteServerRequeueDelay = 10 * time.Second
)

// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=openstackmachines,verbs=get;list;watch;create;update;patch;delete
Expand Down Expand Up @@ -265,7 +266,7 @@ func (r *OpenStackMachineReconciler) reconcileDelete(ctx context.Context, scope
// If the server was found, we need to wait for it to be deleted before
// removing the OpenStackMachine finalizer.
scope.Logger().Info("Waiting for server to be deleted before removing finalizer")
return ctrl.Result{}, nil
return ctrl.Result{RequeueAfter: deleteServerRequeueDelay}, nil
}

controllerutil.RemoveFinalizer(openStackMachine, infrav1.MachineFinalizer)
Expand Down

0 comments on commit 42aca8a

Please sign in to comment.