terraform-aws-gitlab-runner icon indicating copy to clipboard operation
terraform-aws-gitlab-runner copied to clipboard

Runner token usage counter not decrementing when terminating old instance

Open long-wan-ep opened this issue 1 year ago • 0 comments
trafficstars

Describe the bug

The usage counter in the runner token SSM parameter is not decrementing when old runner instances are terminated. I feel like remove-gitlab-registration.service is not running on termination, since I don't see the expected "Token still in use. GitLab Runner not removed from GitLab." message in the logs.

To Reproduce

Steps to reproduce the behavior:

  1. Deploy a runner on version 7.7 of the module
  2. Verify the usage counter for the runner token SSM param is 1
  3. Make a update to the runner config that would result in a runner refresh
  4. Wait for graceful terminate to complete and the old runner instance is terminated
  5. Check the usage counter again, which will show 2 instead of 1

Expected behavior

The usage counter should increment when a new runner instance spins up, and decrement when an old runner instance terminates.

long-wan-ep avatar Jun 11 '24 00:06 long-wan-ep