Add randomized suffix to runner names#183
Merged
Merged
Conversation
BPF CI runners went down recently due to a problem caused by "Runner not found" error returned from a github broker service [1]. It appears that this error may be triggered by the fact that runner names are reused for "different" runners from the perspective of github. In BPF CI we use ephemeral runners which re-register every time a corresponding runner container is restarted. Whatever the root cause, a working mitigation is to use unique runner names. Fortunately, entrypoint.sh [1] already has the logic of generating a random suffix, and we only need to set relevant environment variables. Additionally, set RestartPreventExitStatus=199 in the runner systemd service to prevent error looping in case we run out of tokens [2]. [1] https://github.com/myoung34/docker-github-actions-runner/blob/2.323.0/entrypoint.sh [2] kernel-patches/runner#75 Signed-off-by: Ihor Solodrai <isolodrai@meta.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.
BPF CI runners went down recently due to a problem caused by "Runner not found" error returned from a github broker service [1].
It appears that this error may be triggered by the fact that runner names are reused for "different" runners from the perspective of github. In BPF CI we use ephemeral runners which re-register every time a corresponding runner container is restarted.
Whatever the root cause, a working mitigation is to use unique runner names. Fortunately, entrypoint.sh [1] already has the logic of generating a random suffix, and we only need to set relevant environment variables.
Additionally, set RestartPreventExitStatus=199 in the runner systemd service to prevent error looping in case we run out of tokens [2].
[1] https://github.com/myoung34/docker-github-actions-runner/blob/2.323.0/entrypoint.sh
[2] kernel-patches/runner#75