Skip to content

Commit df2a454

Browse files
committed
add more info in error message
1 parent 80d99f9 commit df2a454

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/cloudstackmachine_controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,9 @@ func (r *CloudStackMachineReconciliationRunner) ReconcileDelete() (retRes ctrl.R
276276
err := r.CSClient.ResolveVMInstanceDetails(r.ReconciliationSubject)
277277
if err != nil {
278278
r.ReconciliationSubject.Status.Status = pointer.String(metav1.StatusFailure)
279-
r.ReconciliationSubject.Status.Reason = pointer.String(err.Error())
279+
r.ReconciliationSubject.Status.Reason = pointer.String(err.Error() +
280+
fmt.Sprintf(" If this VM has already been deleted, please remove the finalizer named %s from object %s",
281+
"cloudstackmachine.infrastructure.cluster.x-k8s.io", r.ReconciliationSubject.Name))
280282
// Cloudstack VM may be not found or more than one found by name
281283
return ctrl.Result{}, err
282284
}

0 commit comments

Comments
 (0)