hashicorp / hashicorp/nomad

Prefetch image before killing the running allocation on task update

Open
#6,380 12 comments 42 reactions 0 assignees View on GitHub
hcc/jira stage/needs-discussion theme/deployments theme/driver/docker type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

### Nomad version
Any (in particular, `0.8.7`)

### Issue

When task is being updated (especially, when underlying docker image is being updated), nomad kills currently running allocation (according to update policy) and only then starts new allocation. Only then new image is being pulled. This can result in a service interruption in cases when service must be running as a singleton or when update is configured incorrectly (i.e., image failed to pull before update interval): old allocation is already killed, but new one is still pulling the image.

Would it make sense to have additional param in `update` stanza that would make nomad prefetch new image and only then start the rollover? Or, if we take it one step further, would it make sense to make nomad kill existing allocation only when new one is reporting "healthy" service checks?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.