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

Using waitExitOrRemoved for docker start #25861

Merged
merged 1 commit into from
Aug 26, 2016

Commits on Aug 25, 2016

  1. Using waitExitOrRemoved for docker start

    Currently start command will invoke getExitCode - which is based on
    Inspect API - to get returned exit code after container exits.
    There's two race conditions here:
    
    if container is started with Restart Policy, there's chance that the
    container is restarted quickly before it calls getExitCode, under such
    circumstance, the exit code is wrong.
    
    if container is started with --rm, it's possible that container is
    removed before getExitCode, in this situation, you can't get correct
    exit code either.
    
    Replace getExitCode with waitExitOrRemoved can solve this problem.
    
    Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
    WeiZhang555 committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    b8464c1 View commit details
    Browse the repository at this point in the history