Skip to content

Commit abae024

Browse files
committed
Treat no match found error as a non-error in machine state checker controller to reconcile the removed VM instance
1 parent 836ccea commit abae024

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

controllers/cloudstackmachinestatechecker_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package controllers
1818

1919
import (
2020
"context"
21+
"strings"
2122
"time"
2223

2324
ctrl "sigs.k8s.io/controller-runtime"
@@ -73,7 +74,7 @@ func (r *CloudStackMachineStateCheckerReconciliationRunner) Reconcile() (ctrl.Re
7374
return res, err
7475
}
7576

76-
if err := r.CSClient.ResolveVMInstanceDetails(r.CSMachine); err != nil {
77+
if err := r.CSClient.ResolveVMInstanceDetails(r.CSMachine); err != nil && !strings.Contains(strings.ToLower(err.Error()), "no match found") {
7778
return r.ReturnWrappedError(err, "failed to resolve VM instance details")
7879
}
7980
if r.CSMachine.Status.InstanceState == "Running" {

0 commit comments

Comments
 (0)