actions / actions-runner-controller

Kubernetes controller for GitHub Actions self-hosted runners
Apache License 2.0
4.73k stars 1.12k forks source link

Too many requeues during CleanupResources #3801

Open pulkitanz opened 4 days ago

pulkitanz commented 4 days ago

Checks

Controller Version

0.9.3

Deployment Method

Other

Checks

To Reproduce

Very easy to reproduce if you have even one local pod running you can check the logs of creation and deletion.

Describe the bug

There's this function to cleanup resources in the ARC controller https://github.com/actions/actions-runner-controller/blob/master/controllers/actions.github.com/ephemeralrunner_controller.go#L137-L144 now this is requeued in the case when the function returns done as false. Now the mess up is that every time this function is called it does this Delete Pod Return false and requeue Next Queue catch up Delete Jitconfig Secret Return false and requeue Next Queue catch up Return true

Why are we requeing it so many times is what I don't understand, why not delete the pod and the jitconfig secret in the same reconcile.

Describe the expected behavior

The amount of requeues here is slowing down our runner termination process.

Additional Context

-

Controller Logs

-

Runner Pod Logs

-
github-actions[bot] commented 4 days ago

Hello! Thank you for filing an issue.

The maintainers will triage your issue shortly.

In the meantime, please take a look at the troubleshooting guide for bug reports.

If this is a feature request, please review our contribution guidelines.