err logs in worker and scheduler

This commit is contained in:
Alex Dadgar 2016-02-22 14:47:59 -08:00
parent f092c7ca15
commit f48eabe753
2 changed files with 2 additions and 0 deletions

View File

@ -255,6 +255,7 @@ func (w *Worker) invokeScheduler(eval *structs.Evaluation, token string) error {
// Process the evaluation
err = sched.Process(eval)
if err != nil {
w.logger.Printf("[ERR] worker: scheduler for evaluation %q errored: %v", eval.ID, err)
return fmt.Errorf("failed to process evaluation: %v", err)
}
return nil

View File

@ -201,6 +201,7 @@ func (s *GenericScheduler) process() (bool, error) {
result, newState, err := s.planner.SubmitPlan(s.plan)
s.planResult = result
if err != nil {
s.logger.Printf("[ERR] sched: %#v: SubmitPlan failed: %v", s.eval, err)
return false, err
}