From 64cd0f7bea81c1275c5801fbfffc3df3f74ab951 Mon Sep 17 00:00:00 2001 From: Shyam Radhakrishnan Date: Sat, 21 Oct 2023 08:19:32 +0530 Subject: [PATCH] Do not put machine in failed state if VM is is topping or stopped state, and use ID from instance during deletion --- controllers/ocimachine_controller.go | 1 + 1 file changed, 1 insertion(+) diff --git a/controllers/ocimachine_controller.go b/controllers/ocimachine_controller.go index 1f8c8678..2c0596f2 100644 --- a/controllers/ocimachine_controller.go +++ b/controllers/ocimachine_controller.go @@ -391,6 +391,7 @@ func (r *OCIMachineReconciler) reconcileNormal(ctx context.Context, logger logr. } fallthrough default: + machineScope.SetNotReady() conditions.MarkFalse(machineScope.OCIMachine, infrastructurev1beta2.InstanceReadyCondition, infrastructurev1beta2.InstanceProvisionFailedReason, clusterv1.ConditionSeverityError, "") machineScope.SetFailureReason(capierrors.CreateMachineError) machineScope.SetFailureMessage(errors.Errorf("Instance status %q is unexpected", instance.LifecycleState))