-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix exec start api with detach and AttachStdin at same time. fixes #2… #20647
Conversation
LGTM |
|
||
b, err = readBody(body) | ||
comment := check.Commentf("response body: %s", b) | ||
c.Assert(err, checker.IsNil, comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a new daemon request here to make sure it's not crashed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that will probably happen, but just want to verify by sending a subsequent request to make sure it's still alive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpuguy83 after some more thoughts, it's better to have this check, I'll do
fd76f8f
to
fb0ac1a
Compare
LGTM |
…by#20638 Signed-off-by: Lei Jitang <leijitang@huawei.com>
Fix exec start api with detach and AttachStdin at same time. fixes #2…
If create a exec command with
AttachStdin
on and start withDetach=true
this will cause daemon crash.
This only happen when use API
fixes #20638
Signed-off-by: Lei Jitang leijitang@huawei.com
/cc @KostyaSha