Improve error return from AnonDialer on Windows#3467
Improve error return from AnonDialer on Windows#3467dmcgowan merged 2 commits intocontainerd:masterfrom
Conversation
|
@jterry75 PTAL |
|
Build succeeded.
|
Codecov Report
@@ Coverage Diff @@
## master #3467 +/- ##
==========================================
+ Coverage 44.24% 44.25% +<.01%
==========================================
Files 124 124
Lines 13732 13730 -2
==========================================
Hits 6076 6076
+ Misses 6725 6723 -2
Partials 931 931
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #3467 +/- ##
==========================================
- Coverage 44.24% 44.23% -0.02%
==========================================
Files 124 124
Lines 13732 13737 +5
==========================================
Hits 6076 6076
- Misses 6725 6730 +5
Partials 931 931
Continue to review full report at Codecov.
|
|
Build succeeded.
|
|
I'm wondering if we could consolidate these changes with https://github.com/containerd/containerd/blob/master/pkg/ttrpcutil/client_windows.go#L30 |
AnonDialer will now return a "not found" error if the pipe is not found before the timeout is reached. If the pipe exists but the timeout is reached while attempting to connect, the timeout error will still be returned. This will allow the error handling logic to work properly when connecting to the shim log pipe. An error message is only logged if the error is not "not found", so now log noise from log pipes that were never intended to be created by the shim will be hidden. This change also cleans up the control flow for AnonDialer on Windows. The new code should be more easily readable, but the only semantic change is the error return value change. Signed-off-by: Kevin Parsons <[email protected]>
|
Build succeeded.
|
jterry75
left a comment
There was a problem hiding this comment.
Now thats some good looking code. LGTM
|
As @mxpv suggested, I have updated the |
|
I filed #3471 to track merging the dialer implementations in the future. |
Signed-off-by: Kevin Parsons <[email protected]>
|
Build succeeded.
|
|
@dmcgowan Any other concerns with this? |
AnonDialer will now return a "not found" error if the pipe is not found
before the timeout is reached. If the pipe exists but the timeout is
reached while attempting to connect, the timeout error will still be
returned.
This will allow the error handling logic to work properly when
connecting to the shim log pipe. An error message is only logged if the
error is not "not found", so now log noise from log pipes that were
never intended to be created by the shim will be hidden.
This change also cleans up the control flow for AnonDialer on Windows.
The new code should be more easily readable, but the only semantic
change is the error return value change.
Signed-off-by: Kevin Parsons [email protected]