Skip to content

Commit 656e4c6

Browse files
mikejohk8s-infra-cherrypick-robot
authored andcommitted
Dereference the instance state
1 parent 4b1ef6c commit 656e4c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/openstackmachine_controller.go

Lines changed: 1 addition & 1 deletion
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)