You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're having an issue where sometimes we need to manually kill a runner if it gets into a bad state, however if I terminate the runner, it doesn't de-register itself from github first, so github continues to report it as offline. Can we add a shutdown hook that deregisters the runner?
Reacted by Gencer W. Genç, Lasse Steffen, Gautam krishna R, Ryan Parman, Thanh Liem Tran and Joel Penner
Thanks for reporting. Yes would be great if we can find a good way to remove those orphan runners in github. But the module does not keep track of created runners (no state). The name of the runner in github is the same as the id of instance, so once the instance in gone we don't know the name of runner anymore.
@npalmIs the runner GitHub token stored somewhere in the file system or somewhere else (param store)? Looks like we currently remove the GitHub token at startup here. I am wondering if we could keep the token in parameter store, and install a systemctl/cloudinit shutdown job or some such (I guess this could also be baked in custom AMI), to run when the instance is shutting down: ./config.sh remove --token $(aws ssm get-parameters ...) && aws ssm delete-parameter ...
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
npalm commentedon Aug 6, 2021
Thanks for reporting. Yes would be great if we can find a good way to remove those orphan runners in github. But the module does not keep track of created runners (no state). The name of the runner in github is the same as the id of instance, so once the instance in gone we don't know the name of runner anymore.
Maybe an idea to hook to the AWS terminate event
npalm commentedon Aug 11, 2021
Also related to #804
jpalomaki commentedon Mar 16, 2022
@npalm
Is the runner GitHub token stored somewhere in the file system or somewhere else (param store)?Looks like we currently remove the GitHub token at startup here. I am wondering if we could keep the token in parameter store, and install a systemctl/cloudinit shutdown job or some such (I guess this could also be baked in custom AMI), to run when the instance is shutting down:./config.sh remove --token $(aws ssm get-parameters ...) && aws ssm delete-parameter ...github-actions commentedon May 27, 2022
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs. Thank you for your contributions.
feat(termination-watcher): deregister runners from GitHub on EC2 term…