ShutdownDelay should apply on shutdowns and "healthy" restarts
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
### Background
The documentation for [`shutdown_delay`](https://www.nomadproject.io/docs/job-specification/task.html#shutdown_delay) makes it unclear under which scenarios the delay is applied. The behavior changed in Nomad 0.9.0:
* 0.8.7 - Delay applies only when stopping a task.
* 0.9.0 - Delay applies when stopping a task *and* when restarting a task.
PR #5957 would have tweaked the behavior further:
* Delay applies when stopping a task and when restarting a "healthy" task. Restarts due to failures - such as `check_restart` induced restarts - are *not* delayed.
Unfortunately PR #5975 was accepted over #5957 because it was a more conservative approach to fixing a critical bug (#5395), and the accepted PR lacks the shutdown delay improvement.
### Enhancement
* [ ] Shutdown delay should not apply to unhealthy restarts like `check_restart`.
* [ ] Shutdown delay's documentation should be updated to reflect its restart impact.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading PR #5957, accepted PR #5975, and bug #5395 to understand the existing shutdown and restart behavior, then review the shutdown_delay documentation linked in the issue. Done means unhealthy restarts such as check_restart are not delayed and the documentation accurately describes the remaining restart impact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100