Skip to content

Commit

Permalink
fix(oscmachine): vmstate is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
sebglon committed Aug 5, 2024
1 parent cc9870f commit 0762d51
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers/oscmachine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ func (r *OscMachineReconciler) reconcile(ctx context.Context, machineScope *scop
conditions.MarkTrue(oscmachine, infrastructurev1beta1.VolumeReadyCondition)

vmState := machineScope.GetVmState()
if vmState == nil {
machineScope.V(2).Info("VmState is not yet availablle")
return ctrl.Result{}, nil
}

switch *vmState {
case infrastructurev1beta1.VmStatePending:
Expand Down

0 comments on commit 0762d51

Please sign in to comment.