[vSphere] Fix typos in actuator
@@ -118,23 +118,23 @@ func (r *Reconciler) update() error {
}
if r.providerStatus.TaskRef != "" {
- motask, err := r.session.GetTask(r.Context, r.providerStatus.TaskRef)
+ moTask, err := r.session.GetTask(r.Context, r.providerStatus.TaskRef)
if err != nil {
if !isRetrieveMONotFound(r.providerStatus.TaskRef, err) {
return err
}
}
- if motask != nil {
- if motask.Info.State == types.TaskInfoStateError {
+ if moTask != nil {
+ if moTask.Info.State == types.TaskInfoStateError {
metrics.RegisterFailedInstanceCreate(&metrics.MachineLabels{
Name: r.machine.Name,
Namespace: r.machine.Namespace,
- Reason: fmt.Sprintf("Create machine task finished with error: %+v", motask.Info.Error),
+ Reason: fmt.Sprintf("Update machine task finished with error: %+v", moTask.Info.Error),
})
}
- if taskIsFinished, err := taskIsFinished(motask); err != nil || !taskIsFinished {
+ if taskIsFinished, err := taskIsFinished(moTask); err != nil || !taskIsFinished {
if !taskIsFinished {
- return fmt.Errorf("task %v has not finished", motask.Reference().Value)
+ return fmt.Errorf("task %v has not finished", moTask.Reference().Value)
}
return err
}
@@ -192,7 +192,7 @@ func (r *Reconciler) delete() error {
metrics.RegisterFailedInstanceCreate(&metrics.MachineLabels{
Name: r.machine.Name,
Namespace: r.machine.Namespace,
- Reason: fmt.Sprintf("Create machine task finished with error: %+v", moTask.Info.Error),
+ Reason: fmt.Sprintf("Delete machine task finished with error: %+v", moTask.Info.Error),
})
}
if taskIsFinished, err := taskIsFinished(moTask); err != nil || !taskIsFinished {
