8000 restart: Fix an error about arguments missing by HuKeping · Pull Request #9919 · moby/moby · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

restart: Fix an error about arguments missing #9919

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

Merged
merged 1 commit into from
Jan 6, 2015
Merged

restart: Fix an error about arguments missing #9919

merged 1 commit into from
Jan 6, 2015

Conversation

HuKeping
Copy link
Contributor
@HuKeping HuKeping commented Jan 6, 2015

Arguments missing in function shouldRestart()

When we specify the restart policy as:
$ docker run --restart=on-failure:3 ubuntu /bin/sh -c 'exit 1'

The debug info output by the daemon is like:
DEBU[0168] stopping restart of container %!s(int=3) because maximum failure could of %!d(MISSING) has been reached

Function shouldRestart() checks the restart policy and records the
debug info and there should be two arguments in the log.Debugf().

Prior to the this patch, the logs were something like this:
- client: $ docker run --restart=on-failure:3 ubuntu /bin/sh -c 'exit 1'
- daemon: INFO[0168] ...
	  DEBU[0168] stopping restart of container %!s(int=3) because maximum
	  failure could of %!d(MISSING) has been reached
	  INFO[0086] ...

Btw, fix a spelling error in the same file:
- cotnainer -> container

----------------------------------------

Signed-off-by: Hu Keping <hukeping@huawei.com>
@jessfraz
Copy link
Contributor
jessfraz commented Jan 6, 2015

damn nice find LGTM

@LK4D4
Copy link
Contributor
LK4D4 commented Jan 6, 2015

LGTM

LK4D4 added a commit that referenced this pull request Jan 6, 2015
restart: Fix an error about arguments missing
@LK4D4 LK4D4 merged commit 1257c38 into moby:master Jan 6, 2015
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

Successfully merging this pull request may close these issues.

3 participants
0