Skip to content

Commit c8f6183

Browse files
authored
Merge pull request #2466 from k8s-infra-cherrypick-robot/cherry-pick-2464-to-release-0.11
[release-0.11] 🐛 fix: dereference the instance state in machine state reconcile calls
2 parents 86a0867 + 2685cf0 commit c8f6183

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/openstackmachine_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ func (r *OpenStackMachineReconciler) reconcileMachineState(scope *scope.WithLogg
453453
// The other state is normal (for example, migrating, shutoff) but we don't want to proceed until it's ACTIVE
454454
// due to potential conflict or unexpected actions
455455
scope.Logger().Info("Waiting for instance to become ACTIVE", "id", openStackServer.Status.InstanceID, "status", openStackServer.Status.InstanceState)
456-
conditions.MarkUnknown(openStackMachine, infrav1.InstanceReadyCondition, infrav1.InstanceNotReadyReason, "Instance state is not handled: %v", openStackServer.Status.InstanceState)
456+
conditions.MarkUnknown(openStackMachine, infrav1.InstanceReadyCondition, infrav1.InstanceNotReadyReason, "Instance state is not handled: %v", ptr.Deref(openStackServer.Status.InstanceState, infrav1.InstanceStateUndefined))
457457

458458
return &ctrl.Result{RequeueAfter: waitForInstanceBecomeActiveToReconcile}
459459
}

0 commit comments

Comments
 (0)