Description
Nomad version
V1.0.2
Operating system and Environment details
CentOS 8
Issue
When a task is in pending state (because restart has been delayed for example due to too many attempts), It seems impossible to restart the pending task or even the full allocation. Only solution seems to stop the full allocation and re-trigger a new evaluation.
Reproduction steps
create a group with multiple tasks and a restart policy with a high interval
ex:
restart {
attempts = 1
delay = "15s"
interval = "24h"
mode = "delay"
}
kill one of the task twice. The first time Nomad will restart the task and the second time it will update the task to pending (reason="Exceeded allowed attempts, applying a delay" delay=23h56m36.226005802s).
At that point if we want to force task to restart via nomad cli or UI, it will fail with error:
nomad alloc restart 41b915e5 monitor
Failed to restart allocation:
Unexpected response code: 500 (Task not running)
Expected Result
Nomad should allow user to restart task without waiting for delay, in case issue has been fixed.
Actual Result
nomad alloc restart 41b915e5 monitor
Failed to restart allocation:
Unexpected response code: 500 (Task not running)
Job file (if appropriate)
Nomad Server logs (if appropriate)
Nomad Client logs (if appropriate)
Metadata
Metadata
Assignees
Type
Projects
Status