hashicorp / nomad-pack

Mozilla Public License 2.0
386 stars 46 forks source link

Error: job already exists and is not managed by nomad pack #561

Open ruslan-y opened 1 week ago

ruslan-y commented 1 week ago

Hi!

After updating a nomad-pack to version 0.1.2, sometimes an error occurs:

! Failed Job Conflict Validation
! Error: job with id "test-job" already exists and is not managed by nomad pack
!   Context:
!     Template Name: test/templates/test.nomad.tpl

If you remove a job from the cluster, it will be redeployed correctly, but after some time, this error occurs again.

tgross commented 1 week ago

Hi @ruslan-y! Just for clarity, was the job deployed by Nomad Pack before? Are you updating the job outside of Pack at all? (Ex are you also running Autoscaler or running nomad job scale)?

ruslan-y commented 1 week ago

@tgross Yes, the job was deployed by Nomad Pack before. And we're not updating the job outside of Pack, just use nomad-pack in our CICD.

tgross commented 1 week ago

Ok, thanks for the clarification. I'll mark this issue for roadmapping.

ruslan-y commented 1 week ago

@tgross I also realized that if you stop the job in the Nomad UI and then run it again, the next attempt to deploy by nomad-pack will occur this error.