hashicorp/consul-template

with multiple templates it is not clear where error happened

EugenKon opened this issue · 1 comments

Nomad version

v1.8.0

Issue

It is not clear where error happened if "job" has a few tasks with a few templates each
image

Reproduction steps

nomad plan, nomad run

Expected Result

It should be clear in which template the error happened.

Actual Result

The error message is not clear.

Job file (if appropriate)

task "postgres-reindex-task" {
  template { ... }
  template { ... }
  template { ... }
}

UPD
Though in the command line it is easier to understand where errors happened:
image

Hi @EugenKon! That's a good call out but harder than you might expect to fix. There's basically two problems here: first is that the templates don't have names of any kind, so there's no nice way to identify which template is the problem except by maybe the order. The second problem, which is much more challenging for Nomad, is that we pass all the templates to a single consul-template runner, and the errors you're seeing are what the template runner is sending us. So to really fix this we'd need to change the behavior in consul-template.

I'm going to move this issue to the CT repo and maybe folks will have thoughts there.