Skip to content

Conversation

@runcom
Copy link
Member

@runcom runcom commented Apr 13, 2015

Signed-off-by: Antonio Murdaca me@runcom.ninja

Copy link
Member Author

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

Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly

Copy link
Member Author

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?

Copy link
Contributor

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 :/

Copy link
Contributor

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?

Copy link
Member Author

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

@LK4D4
Copy link
Contributor

LK4D4 commented Apr 16, 2015

@runcom Need rebase

Signed-off-by: Antonio Murdaca <me@runcom.ninja>
@runcom
Copy link
Member Author

runcom commented Apr 16, 2015

@LK4D4 done

@cpuguy83
Copy link
Member

LGTM

1 similar comment
@LK4D4
Copy link
Contributor

LK4D4 commented Apr 16, 2015

LGTM

LK4D4 added a commit that referenced this pull request Apr 16, 2015
@LK4D4 LK4D4 merged commit 5224151 into moby:master Apr 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants