Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Save start error into State.Error when the container fails to start#8315

Merged
jessfraz merged 1 commit into
moby:masterfrom
dqminh:save-start-error
Oct 24, 2014
Merged

Save start error into State.Error when the container fails to start#8315
jessfraz merged 1 commit into
moby:masterfrom
dqminh:save-start-error

Conversation

@dqminh

@dqminh dqminh commented Sep 30, 2014

Copy link
Copy Markdown
Contributor

When a container failed to start, in addition to returning the error message in output, we also save that error message into State.Error so it can be read from docker inspect again by user without having to start the container again / read from the logs.

This is particularly helpful for container management systems where we don't want to save last error message returned in POST /containers/:id/start output, but still want to let users read it later so they can resolve it.

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh [email protected] (github: dqminh)

@dqminh

dqminh commented Sep 30, 2014

Copy link
Copy Markdown
Contributor Author

I think this might resolve #8294 too

@erikh

erikh commented Sep 30, 2014

Copy link
Copy Markdown
Contributor

LGTM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we also pass the error

@dqminh

dqminh commented Oct 12, 2014

Copy link
Copy Markdown
Contributor Author

@jfrazelle thanks, i didnt know about %q. It's so nice. I amended/rebased the PR. PTAL.

@jessfraz

Copy link
Copy Markdown
Contributor

@dqminh it's a gamechanger :) thanks!

@jessfraz

Copy link
Copy Markdown
Contributor

LGTM (for after 1.3)

@tiborvass

Copy link
Copy Markdown
Contributor

@dqminh needs a rebase

when a container failed to start, saves the error message into State.Error so
that it can be retrieved when calling `docker inspect` instead of having to
look at the log

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <[email protected]> (github: dqminh)
@dqminh

dqminh commented Oct 23, 2014

Copy link
Copy Markdown
Contributor Author

@tiborvass rebased. PTAL

jessfraz pushed a commit that referenced this pull request Oct 24, 2014
Save start error into State.Error when the container fails to start
@jessfraz jessfraz merged commit 9094c19 into moby:master Oct 24, 2014
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.

4 participants