Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nomad Tasks with Restart "delay" should never get into the case of TaskNotRestarting #1328

Closed
camerondavison opened this issue Jun 21, 2016 · 2 comments · Fixed by #1405
Closed

Comments

@camerondavison
Copy link
Contributor

The logic

if r.policy.Mode == structs.RestartPolicyModeFail {
that exists for handleWaitResult should also be applied to handleStartError
if r.count > r.policy.Attempts {

Also this includes

if rerr, ok := r.startErr.(*cstructs.RecoverableError); !(ok && rerr.Recoverable) {
things deemed ReasonUnrecoverableErrror. If the policy is set to Restart "delay" instead of "fail" I feel like there should not be anything that is considered Unrecoverable unless it is some kind of task definition error.

I am not really able to create a list of unrecoverable errors. Looks like the default for a start error is unrecoverable, and then you specify some as recoverable. Some things that I have seen marked as unrecoverable are

  • unable to find image in registry (Error while pulling image: Get ******: dial tcp *****: connect: network is unreachable, certainly recoverable)
  • unable to bind to port (again recoverable, especially if it makes it pick a new random port)
@diptanu
Copy link
Contributor

diptanu commented Jun 21, 2016

@a86c6f7964 Yeah, we could apply the logic of restarting tasks which have exhausted the restart counts within the restart-interval and are failing because of recoverable errors.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants