Nomad Update doesn't wait for new Docker image

Hello!

I have the following problem. I am updating a Nomad job by specifying new docker image id in the job definition. Due to some special network characteristics it takes almost 10 minutes to download the new Docker image. I can handle that by increasing Drivers: Docker | Nomad | HashiCorp Developer and everything works fine.

What’s not nice is that Nomad turns off the old job, downloads the new image (which takes 10 minutes) and then starts the new job. I end up with 10 minutes of downtime in between. Is it possible somehow to instruct Nomad to wait with turning off the old image until the new Docker image is downloaded?

The only similar thing in Update stanza that I can find here update Block - Job Specification | Nomad | HashiCorp Developer is the Blue/Green deployment. But due to the way this service works I can’t have two of the exact same instances running at the same time.

Is there some simple flag I am missing?

Thanks in advance for any help!

1 Like

Had some similar issue when suddenly got exposed to some error in network stack…

Anyway canary deployment works great for me. A hacky alternative is to run pre-start job that executes docker pull. No other ideas.