actions / actions-runner-controller

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

Job random stuck with "Job is waiting for a runner from XXX to come online" #3501

Closed cheskayang closed 1 month ago

cheskayang commented 1 month ago

Checks

Controller Version

0.9.1

Deployment Method

ArgoCD

Checks

To Reproduce

this error happens randomly

Describe the bug

Job randomly gets stuck with the msg "Job is waiting for a runner from XXX to come online" cancel the job and rerun will fix it.

Observations: 1: Compared with jobs without issue, for this job gets stuck, there is no job started msgs get received on the listener pod (i.e. it only gets job available, job assigned, and then stuck util cancelled manually..)

  1. for the job gets stuck, the EphemeralRunnerSet gets patched to 1 replica and then immediately gets patched to null, see logs below

    2024-05-06T13:44:52Z INFO listener-app.worker.kubernetesworker Created merge patch json for EphemeralRunnerSet update {"json": "{\"spec\":{\"patchID\":1,\"replicas\":1}}"}
    2024-05-06T13:44:52Z INFO listener-app.worker.kubernetesworker Scaling ephemeral runner set {"assigned job": 1, "decision": 1, "min": 0, "max": 20, "currentRunnerCount": 0, "jobsCompleted": 0}
    2024-05-06T13:44:52Z INFO listener-app.worker.kubernetesworker Ephemeral runner set scaled. {"namespace": "arc-runners", "name": "basic-runner-622tx", "replicas": 1}
    2024-05-06T13:44:52Z INFO listener-app.listener Getting next message {"lastMessageID": 248}
    2024-05-06T13:45:42Z INFO listener-app.worker.kubernetesworker Created merge patch json for EphemeralRunnerSet update {"json": "{\"spec\":{\"patchID\":0,\"replicas\":null}}"}
    2024-05-06T13:45:42Z INFO listener-app.worker.kubernetesworker Scaling ephemeral runner set {"assigned job": 0, "decision": 0, "min": 0, "max": 20, "currentRunnerCount": 1, "jobsCompleted": 0}
    2024-05-06T13:45:42Z INFO listener-app.worker.kubernetesworker Ephemeral runner set scaled. {"namespace": "arc-runners", "name": "basic-runner-622tx", "replicas": 0}
    2024-05-06T13:45:42Z INFO listener-app.listener Getting next message {"lastMessageID": 248}
  2. the following log seems to occur on the controller side when this issue happens

    Getting runner jit config failed with conflict error, trying to get the runner by name

Describe the expected behavior

job should not stuck

Additional Context

- cancel the job and rerun will fix the issue
- having both issues on 0.9.0, 0.9.1
- running on gke

Controller Logs

see description

Runner Pod Logs

N/A
github-actions[bot] commented 1 month 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.

cheskayang commented 1 month ago

same issue as mentioned in https://github.com/actions/actions-runner-controller/issues/3499 and https://github.com/actions/actions-runner-controller/issues/3420 providing more details on the observed behavior

nikola-jokic commented 1 month ago

Closing this one as a duplicate. Thank you for linking it!