bosh-init icon indicating copy to clipboard operation
bosh-init copied to clipboard

bosh-init uses template name as job name

Open mtekel opened this issue 9 years ago • 2 comments

When you define

jobs:
- name: myjob
  templates:
  - name: mypackage
    release: release1

Then <%= name %> in erb template of the mypackage will be mypackage instead of myjob. For example in case of collectd, your VM will send metrics as collectd instead of myjob. This is quite confusing, especially if you deploy multiple servers with bosh-init and they all end up with same name in their job configs...

bosh-init versions 0.0.95 and 0.0.80 - both have this behaviour.

mtekel avatar Jul 18 '16 10:07 mtekel

@mtekel yup looks like a bug. should be instance group's name.

cppforlife avatar Jul 19 '16 23:07 cppforlife

I'd guess NewEvaluationContext should be receiving an Instance and using Instance.JobName() for Name instead. Doesn't seem like this fix would be affected by CLI-related changes and could be safely PR'd to bosh-init and later merged to cli branch.

dpb587-pivotal avatar Jul 21 '16 17:07 dpb587-pivotal