Skip to content

Commit 648e89d

Browse files
mikejohEmilienM
authored andcommitted
Dereference the instance state
1 parent 864815a commit 648e89d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: 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)