Skip to content

Commit

Permalink
Stop swallowing VM deployment errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdoherty4 authored and hrak committed Oct 2, 2023
1 parent 02692cc commit bb1bf7b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/cloud/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,13 @@ func (c *client) DeployVM(

csMachine.Spec.InstanceID = pointer.String(vm.Id)
csMachine.Status.InstanceState = vm.State
} else {
csMachine.Spec.InstanceID = pointer.String(deployVMResp.Id)
csMachine.Status.Status = pointer.String(metav1.StatusSuccess)

return fmt.Errorf("incomplete vm deployment (vm_id=%v): %w", vm.Id, err)
}

csMachine.Spec.InstanceID = pointer.String(deployVMResp.Id)
csMachine.Status.Status = pointer.String(metav1.StatusSuccess)

return nil
}

Expand Down

0 comments on commit bb1bf7b

Please sign in to comment.