Repository navigation
[runner] Keep sshd alive until the runner stops it - #4417
Merged
Merged
Conversation
sshd was started on the runner's signal context, so a shutdown signal killed it immediately, while the runner went on waiting for the server to pull the job's final state. On backends where the server reaches the runner through the container's sshd, the pull could never happen: the server marked the job INSTANCE_UNREACHABLE after two minutes. Detach sshd's lifetime from the caller's context and let Stop cancel it, keeping SIGTERM with the SIGKILL backstop as the only way down. Stop now checks the exit status itself, as Wait reports the cancellation in its place. Fixes: #4415 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
sshd was started on the runner's signal context, so a shutdown signal killed it immediately, while the runner went on waiting for the server to pull the job's final state. On backends where the server reaches the runner through the container's sshd, the pull could never happen: the server marked the job INSTANCE_UNREACHABLE after two minutes.
Detach sshd's lifetime from the caller's context and let Stop cancel it, keeping SIGTERM with the SIGKILL backstop as the only way down. Stop now checks the exit status itself, as Wait reports the cancellation in its place.
Fixes: #4415