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

Enhancement: Retry count should be 0 or omitted with "no" policy #338

Closed
jasonjoo2010 opened this issue Feb 15, 2021 · 1 comment
Closed

Comments

@jasonjoo2010
Copy link
Contributor

Background

In business the restart policy needs to be set to no.

Result Expected

Success.

Result Actual

Fail with: maximum retry count could be used with policy "no".

Related Code

container.go:58

// set restart always
restartRetryCount := 3
if opts.RestartPolicy == restartAlways {
    restartRetryCount = 0
}

The retry count should be 0 when using no policy or just omit it.

Workaround

Currently a workaround works that is setting policy to empty instead of setting it to no explicitly. Better to fix it in future in core.

@CMGS
Copy link
Contributor

CMGS commented Feb 16, 2021

这里需要屏蔽 restart 逻辑,抽象成 eru 的 restart 逻辑

@CMGS CMGS closed this as completed Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants