-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Do not use stream encoders for pipe communication #515
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
Conversation
libcontainer/utils/utils.go
Outdated
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.
would be nice to have the returned length and expected value here, something like: fmt.Errorf("object not written, got(%d), expected(%d)", n, len(data))
|
I think having a separate pipe for sync would significantly simplify the code. But for now, this code is fine. |
bd53ea9 to
bc4612d
Compare
libcontainer/utils/utils.go
Outdated
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.
%s --> %d
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.
it was a typo!
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.
s and d are so close :)
bc4612d to
15f67fe
Compare
libcontainer/utils/utils.go
Outdated
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.
@dqminh I'm pretty sure that Write will return io.ShortWrite before this line :) but it's ok I think
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.
yah thats true ( Write must return a non-nil error if it returns n < len(p)), so i dont think we need this check
|
LGTM |
Marshall the raw objects for the sync pipes so that no new line chars are left behind in the pipe causing errors. Signed-off-by: Michael Crosby <[email protected]>
15f67fe to
ddcee3c
Compare
|
LGTM. @crosbymichael Not sure if we want to wait for the docker testing results to come back or not before merging. |
|
Tested the patch provided in #508 (comment) against docker 1.9.1 in production and it resolves our issue. Thanks! |
|
@csfrancis awesome! thanks for your help |
Do not use stream encoders for pipe communication
|
Nice! |
|
I have created moby/moby#19752 to bump the version in docker |
…number README: Update conference-call phone number
Marshall the raw objects for the sync pipes so that no new line chars
are left behind in the pipe causing errors.
Signed-off-by: Michael Crosby [email protected]