fail on file not found for shim reconnect on containerd restart#3659
Merged
crosbymichael merged 1 commit intocontainerd:masterfrom Sep 18, 2019
Merged
Conversation
Signed-off-by: Kathryn Baldauf <[email protected]>
|
Build succeeded.
|
Codecov Report
@@ Coverage Diff @@
## master #3659 +/- ##
==========================================
- Coverage 42.39% 42.34% -0.05%
==========================================
Files 127 127
Lines 14048 14063 +15
==========================================
Hits 5955 5955
- Misses 7193 7208 +15
Partials 900 900
Continue to review full report at Codecov.
|
Member
|
LGTM |
eginez
added a commit
to eginez/containerd
that referenced
this pull request
Apr 9, 2026
The shim "start" helper returns the named pipe address before the daemon process has created the pipe via winio.ListenPipe(). On busy Windows systems, containerd may try to connect before the pipe exists. Add awaitPipeReady() — the start helper now polls the pipe address (up to 5s, 10ms intervals) before writing the bootstrap result to stdout. This follows hcsshim's readiness pattern where the shim verifies its endpoint is ready before signaling the parent. As a safety net, also parameterize makeConnection() with a dialer so binary.Start() uses AnonDialer (retry) for new shims while loadShim() keeps AnonReconnectDialer (fail-fast) for reconnects per containerd#3659. On Unix, awaitPipeReady() is a no-op: domain sockets appear atomically.
eginez
added a commit
to eginez/containerd
that referenced
this pull request
Apr 9, 2026
The shim "start" helper returns the named pipe address before the daemon process has created the pipe via winio.ListenPipe(). On busy Windows systems, containerd may try to connect before the pipe exists. Add awaitPipeReady() — the start helper now polls the pipe address (up to 5s, 10ms intervals) before writing the bootstrap result to stdout. This follows hcsshim's readiness pattern where the shim verifies its endpoint is ready before signaling the parent. As a safety net, also parameterize makeConnection() with a dialer so binary.Start() uses AnonDialer (retry) for new shims while loadShim() keeps AnonReconnectDialer (fail-fast) for reconnects per containerd#3659. On Unix, awaitPipeReady() is a no-op: domain sockets appear atomically. Signed-off-by: Esteban Ginez <[email protected]>
eginez
added a commit
to eginez/containerd
that referenced
this pull request
Apr 10, 2026
The shim "start" helper returns the named pipe address before the daemon process has created the pipe via winio.ListenPipe(). On busy Windows systems, containerd may try to connect before the pipe exists. Add awaitPipeReady() — the start helper now polls the pipe address (up to 5s, 10ms intervals) before writing the bootstrap result to stdout. This follows hcsshim's readiness pattern where the shim verifies its endpoint is ready before signaling the parent. As a safety net, also parameterize makeConnection() with a dialer so binary.Start() uses AnonDialer (retry) for new shims while loadShim() keeps AnonReconnectDialer (fail-fast) for reconnects per containerd#3659. On Unix, awaitPipeReady() is a no-op: domain sockets appear atomically. Signed-off-by: Esteban Ginez <[email protected]>
kairosci
pushed a commit
to kairosci/containerd
that referenced
this pull request
May 1, 2026
The shim "start" helper returns the named pipe address before the daemon process has created the pipe via winio.ListenPipe(). On busy Windows systems, containerd may try to connect before the pipe exists. Add awaitPipeReady() — the start helper now polls the pipe address (up to 5s, 10ms intervals) before writing the bootstrap result to stdout. This follows hcsshim's readiness pattern where the shim verifies its endpoint is ready before signaling the parent. As a safety net, also parameterize makeConnection() with a dialer so binary.Start() uses AnonDialer (retry) for new shims while loadShim() keeps AnonReconnectDialer (fail-fast) for reconnects per containerd#3659. On Unix, awaitPipeReady() is a no-op: domain sockets appear atomically. Signed-off-by: Esteban Ginez <[email protected]>
kairosci
pushed a commit
to kairosci/containerd
that referenced
this pull request
May 2, 2026
The shim "start" helper returns the named pipe address before the daemon process has created the pipe via winio.ListenPipe(). On busy Windows systems, containerd may try to connect before the pipe exists. Add awaitPipeReady() — the start helper now polls the pipe address (up to 5s, 10ms intervals) before writing the bootstrap result to stdout. This follows hcsshim's readiness pattern where the shim verifies its endpoint is ready before signaling the parent. As a safety net, also parameterize makeConnection() with a dialer so binary.Start() uses AnonDialer (retry) for new shims while loadShim() keeps AnonReconnectDialer (fail-fast) for reconnects per containerd#3659. On Unix, awaitPipeReady() is a no-op: domain sockets appear atomically. Signed-off-by: Esteban Ginez <[email protected]>
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.
Previously for windows, when containerd restarts and attempts to reconnect to shim pipes, if the pipe file is not found for a shim, containerd would wait up to 5 seconds before returning a failure. If containerd is still attempting to connect to shims after 30 seconds, the windows service manager will kill containerd. This work breaks up the cases of connecting to shims into two cases: shim starting and shim reconnecting. In the former, containerd will still wait up to 5 seconds for a pipe to be served by a starting shim. In the latter, containerd will return file not found immediately when attempting to connect to a nonexistent or dead shim.
Signed-off-by: Kathryn Baldauf [email protected]