func (task *provisionerTask) setErrorStatus(message string, machine *apiprovisioner.Machine, err error) error { logger.Errorf(message, machine, err) if err1 := machine.SetStatus(params.StatusError, err.Error(), nil); err1 != nil { // Something is wrong with this machine, better report it back. return errors.Annotatef(err1, "cannot set error status for machine %q", machine) } return nil }