Skip to content

Deregister runner on shutdown #1006

Closed
Closed

Description

@mrmeyers99

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?

Activity

  1. npalm commented on Aug 6, 2021

    @npalm
    Member

    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

  2. added
    help wanted
    on Aug 6, 2021
  3. npalm commented on Aug 11, 2021

    @npalm
    Member

    Also related to #804

  4. jpalomaki commented on Mar 16, 2022

    @jpalomaki
    Contributor

    @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 ...

  5. github-actions commented on May 27, 2022

    @github-actions
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Staleabandonedhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions