Just to update this thread.
restart stanza will NOT be executed if there is no
check_restart if depending on the health check for restarts–
check_restart needs to be defined.
If an allocation is deemed unhealthy by the nomad deployment, it will stay unhealthy. The allocation needs to be rescheduled in order for the deployment to progress, which means forcing the allocation to fail with a
restart attempts set to 0. The new allocation, if becoming healthy, will satisfy the deployment progression.
I’m not sure if deployments should change “unhealthy” to “healthy” if the same allocation eventually ends up becoming healthy based on restarts from the
restart stanza. I would have believed it should. Should this be revisited?