Skip to content

🐛 Requeue when waiting for a server to be deleted #2254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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