-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Remove job from restart #12350
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
Remove job from restart #12350
Conversation
api/server/server.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if the code above is ok because in daemon.ContainerRestart there was a default 10 seconds to container.Restart only if not job.EnvExists("t") but cli always set 10 seconds default from cli/restart. Maybe old api?
I just commented what I would use if there wasn't that old 10 default in daemon.ContainerRestart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, looks like it was 0 if t is not passed in querystring, because it is always exists in env, even if it is "". WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LK4D4 so that 10 was never matched right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10 was default only for CLI. For API it is 0 as I see :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if the default (10) was pushed down into ContainerRestart() and not set here at the API level - otherwise we run the risk of having different defaults based on who is calling ContainerRestart(). Can we have ContainerRestart() treat 0 as "no value specified" and then have it default to 10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LK4D4 I was referring to this 10 before, I mean this t was never met
|
@runcom Need rebase |
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
572dcf8 to
e41192a
Compare
|
@LK4D4 done |
|
LGTM |
1 similar comment
|
LGTM |
Signed-off-by: Antonio Murdaca me@runcom.ninja