Nomad: Support rerunning of the same job via force flag

Created on 12 Aug 2016  路  3Comments  路  Source: hashicorp/nomad

As stated in #1575, rerunning the same task even though something external to the job-spec has changed, e.g. an artifact, does not happen in between GC cycles. The currently workaround is to trigger a GC via the HTTP API and then resubmit the job. Adding a --force flag to nomad run will make this more convenient and is more intuitive to the user.

themcli themcore themscheduling typenhancement

Most helpful comment

Dunno about GC, but what I do is having an env var in the HCL called "CHANGE_ME" which I replace with sed with a random number (jenkins build number of the job that re-submits the nomad job) and because it's always different it re-evaluates and downloads the new docker image.

All 3 comments

Hey guys. Now the way (with downtime) would be to stop the job and then run it again?
I did not find any explanation regarding the trigger GC in docs. Perhaps you can enlighten me :)

Thanks

Dunno about GC, but what I do is having an env var in the HCL called "CHANGE_ME" which I replace with sed with a random number (jenkins build number of the job that re-submits the nomad job) and because it's always different it re-evaluates and downloads the new docker image.

I'd pretty much like to have something like this as well, but especially for artifact{} I'd love to have nomad compare current runs artifacts checksums with remote checksums and trigger a re-run if checksums mismatch. e.g. using the same url in artifact{} source and allow to reschedule a job if the artifact had been updated.

Currently my ultimate goal is to maintain .nomad files with git and have continuous deployment with nomad without ever touching the jobspec files.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mancusogmu picture mancusogmu  路  3Comments

mlafeldt picture mlafeldt  路  3Comments

clinta picture clinta  路  3Comments

dekimsey picture dekimsey  路  3Comments

hynek picture hynek  路  3Comments