Fix exec start api with detach and AttachStdin at same time. fixes #2…#20647
Merged
calavera merged 1 commit intomoby:masterfrom Feb 25, 2016
Merged
Fix exec start api with detach and AttachStdin at same time. fixes #2…#20647calavera merged 1 commit intomoby:masterfrom
calavera merged 1 commit intomoby:masterfrom
Conversation
Contributor
|
LGTM |
Member
There was a problem hiding this comment.
Can you add a new daemon request here to make sure it's not crashed?
Contributor
Author
There was a problem hiding this comment.
@cpuguy83 In this test, there is no need to add a new daemon request here, because if the daemon is crashed, _, body, err := sockRequestRaw("POST", fmt.Sprintf("/exec/%s/start", createResp.ID), strings.NewReader({"Detach": true}), "application/json") will return error.
Member
There was a problem hiding this comment.
I understand that will probably happen, but just want to verify by sending a subsequent request to make sure it's still alive.
Contributor
Author
There was a problem hiding this comment.
@cpuguy83 after some more thoughts, it's better to have this check, I'll do
fd76f8f to
fb0ac1a
Compare
Contributor
Author
Member
|
LGTM |
…by#20638 Signed-off-by: Lei Jitang <[email protected]>
calavera
added a commit
that referenced
this pull request
Feb 25, 2016
Fix exec start api with detach and AttachStdin at same time. fixes #2…
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If create a exec command with
AttachStdinon and start withDetach=truethis will cause daemon crash.
This only happen when use API
fixes #20638
Signed-off-by: Lei Jitang [email protected]
/cc @KostyaSha