Repository navigation
fix(iclient): retry an operation listener the server was slow to accept - #216
Merged
Merged
Conversation
async() opens the operation's event listener before it sends the request. When incusd does not answer that websocket upgrade within the 5s handshake timeout, the whole operation fails with "opening the event socket: read unix ... i/o timeout". Seen in production on an idle host: a nightly `up --recreate` failed its stop and its delete this way, both in the same second, and incusd logged "Failed upgrading event connection ... broken pipe" as it answered a client that had already gone. An immediate re-run succeeded. Nothing has been sent to the server at that point, so opening the listener again cannot run anything twice. listenOperationEvents retries it on a timeout only, with the same budget and delay waitOutOperation already uses for a socket lost mid-operation. A server that answers, a refusal for example, answers the same way again, so that still fails at once. The handshake timeout becomes a Connection field, as eventSilence is, so a test does not wait five seconds per attempt.
alien43
force-pushed
the
fix/transient-incus-connection-retry
branch
from
September 27, 2026 20:27
16262ae to
f7bf6f5
Compare
Member
|
Thank you! |
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.
async()opens the operation's event listener before it sends the request. When incusd does not answer that websocket upgrade within the 5s handshake timeout, the whole operation fails with "opening the event socket: read unix ... i/o timeout". Seen in production on an idle host:up --recreatefailed its stop and its delete this way, both in the same second, and incusd logged "Failed upgrading event connection ... broken pipe" as it answered a client that had already gone. An immediate re-run succeeded.The handshake timeout becomes a Connection field, as eventSilence is, so a test does not wait five seconds per attempt.