Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying using argocd will continue to restart the listener pod. #3877

Open
4 tasks done
codequokka opened this issue Jan 11, 2025 · 2 comments
Open
4 tasks done

Deploying using argocd will continue to restart the listener pod. #3877

codequokka opened this issue Jan 11, 2025 · 2 comments
Labels
bug Something isn't working gha-runner-scale-set Related to the gha-runner-scale-set mode needs triage Requires review from the maintainers

Comments

@codequokka
Copy link

Checks

Controller Version

0.10.1

Deployment Method

ArgoCD

Checks

  • This isn't a question or user support case (For Q&A and community support, go to Discussions).
  • I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes

To Reproduce

Installed the arc controller and runner set via Helmfile onto ArgoCD.

Describe the bug

The Listener pod outputs the following log and continues to restart.

kubectl logs -n arc-systems -f arc-runner-set-754b578d-listener
2025-01-11T09:44:30Z    INFO    listener-app    app initialized
2025-01-11T09:44:30Z    INFO    listener-app    Starting listener
2025-01-11T09:44:30Z    INFO    listener-app    refreshing token        {"githubConfigUrl": "https://github.com/codequokka/argocd-poc"}
2025-01-11T09:44:30Z    INFO    listener-app    getting runner registration token       {"registrationTokenURL": "https://api.github.com/repos/codequokka/argocd-poc/actions/runners/registration-token"}
2025-01-11T09:44:30Z    INFO    listener-app    getting Actions tenant URL and JWT      {"registrationURL": "https://api.github.com/actions/runner-registration"}
2025-01-11T09:44:31Z    INFO    listener-app.listener   Current runner scale set statistics.    {"statistics": "{\"totalAvailableJobs\":0,\"totalAcquiredJobs\":0,\"totalAssignedJobs\":0,\"totalRunningJobs\":0,\"totalRegisteredRunners\":1,\"totalBusyRunners\":0,\"totalIdleRunners\":0}"}
2025-01-11T09:44:31Z    INFO    listener-app.worker.kubernetesworker    Calculated target runner count  {"assigned job": 0, "decision": 1, "min": 1, "max": 1, "currentRunnerCount": 1, "jobsCompleted": 0}
2025-01-11T09:44:32Z    INFO    listener-app.worker.kubernetesworker    Compare {"original": "{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"replicas\":-1,\"patchID\":-1,\"ephemeralRunnerSpec\":{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"containers\":null}}},\"status\":{\"currentReplicas\":0,\"pendingEphemeralRunners\":0,\"runningEphemeralRunners\":0,\"failedEphemeralRunners\":0}}", "patch": "{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"replicas\":1,\"patchID\":0,\"ephemeralRunnerSpec\":{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"containers\":null}}},\"status\":{\"currentReplicas\":0,\"pendingEphemeralRunners\":0,\"runningEphemeralRunners\":0,\"failedEphemeralRunners\":0}}"}
2025-01-11T09:44:32Z    INFO    listener-app.worker.kubernetesworker    Preparing EphemeralRunnerSet update     {"json": "{\"spec\":{\"patchID\":0,\"replicas\":1}}"}
2025-01-11T09:44:32Z    INFO    listener-app.worker.kubernetesworker    Ephemeral runner set scaled.    {"namespace": "arc-runners", "name": "arc-runner-set-lq8c8", "replicas": 1}
2025-01-11T09:44:32Z    INFO    listener-app.listener   Getting next message    {"lastMessageID": 0}
2025-01-11T09:45:26Z    INFO    listener-app.worker.kubernetesworker    Calculated target runner count  {"assigned job": 0, "decision": 1, "min": 1, "max": 1, "currentRunnerCount": 1, "jobsCompleted": 0}
2025-01-11T09:45:26Z    INFO    listener-app.worker.kubernetesworker    Compare {"original": "{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"replicas\":-1,\"patchID\":-1,\"ephemeralRunnerSpec\":{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"containers\":null}}},\"status\":{\"currentReplicas\":0,\"pendingEphemeralRunners\":0,\"runningEphemeralRunners\":0,\"failedEphemeralRunners\":0}}", "patch": "{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"replicas\":1,\"patchID\":0,\"ephemeralRunnerSpec\":{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"containers\":null}}},\"status\":{\"currentReplicas\":0,\"pendingEphemeralRunners\":0,\"runningEphemeralRunners\":0,\"failedEphemeralRunners\":0}}"}
2025-01-11T09:45:26Z    INFO    listener-app.worker.kubernetesworker    Preparing EphemeralRunnerSet update     {"json": "{\"spec\":{\"patchID\":0,\"replicas\":1}}"}
2025-01-11T09:45:26Z    INFO    listener-app.worker.kubernetesworker    Ephemeral runner set scaled.    {"namespace": "arc-runners", "name": "arc-runner-set-lq8c8", "replicas": 1}
2025-01-11T09:45:26Z    INFO    listener-app.listener   Getting next message    {"lastMessageID": 0}
2025-01-11T09:46:20Z    INFO    listener-app.worker.kubernetesworker    Calculated target runner count  {"assigned job": 0, "decision": 1, "min": 1, "max": 1, "currentRunnerCount": 1, "jobsCompleted": 0}
2025-01-11T09:46:20Z    INFO    listener-app.worker.kubernetesworker    Compare {"original": "{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"replicas\":-1,\"patchID\":-1,\"ephemeralRunnerSpec\":{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"containers\":null}}},\"status\":{\"currentReplicas\":0,\"pendingEphemeralRunners\":0,\"runningEphemeralRunners\":0,\"failedEphemeralRunners\":0}}", "patch": "{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"replicas\":1,\"patchID\":0,\"ephemeralRunnerSpec\":{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"containers\":null}}},\"status\":{\"currentReplicas\":0,\"pendingEphemeralRunners\":0,\"runningEphemeralRunners\":0,\"failedEphemeralRunners\":0}}"}
2025-01-11T09:46:20Z    INFO    listener-app.worker.kubernetesworker    Preparing EphemeralRunnerSet update     {"json": "{\"spec\":{\"patchID\":0,\"replicas\":1}}"}
2025-01-11T09:46:20Z    INFO    listener-app.worker.kubernetesworker    Ephemeral runner set scaled.    {"namespace": "arc-runners", "name": "arc-runner-set-lq8c8", "replicas": 1}
2025-01-11T09:46:20Z    INFO    listener-app.listener   Getting next message    {"lastMessageID": 0}
2025-01-11T09:47:07Z    ERROR   listener-app    Retryable client error  {"error": "Get \"https://pipelinesghubeus2.actions.githubusercontent.com/UAtuLgkhN55sFa9LjPChqErGzAtn5KmhHmxOqJmuvRJxw5lyJI/_apis/runtime/runnerscalesets/4/messages?sessionId=6c3a7d29-e084-4729-84da-d2326b4245fe&api-version=6.0-preview\": context canceled", "method": "GET", "url": "https://pipelinesghubeus2.actions.githubusercontent.com/UAtuLgkhN55sFa9LjPChqErGzAtn5KmhHmxOqJmuvRJxw5lyJI/_apis/runtime/runnerscalesets/4/messages?sessionId=6c3a7d29-e084-4729-84da-d2326b4245fe&api-version=6.0-preview", "error": "request failed"}
github.com/actions/actions-runner-controller/github/actions.(*clientLogger).Error
        github.com/actions/actions-runner-controller/github/actions/client.go:77
github.com/hashicorp/go-retryablehttp.(*Client).Do
        github.com/hashicorp/[email protected]/client.go:718
github.com/hashicorp/go-retryablehttp.(*RoundTripper).RoundTrip
        github.com/hashicorp/[email protected]/roundtripper.go:47
net/http.send
        net/http/client.go:259
net/http.(*Client).send
        net/http/client.go:180
net/http.(*Client).do
        net/http/client.go:724
net/http.(*Client).Do
        net/http/client.go:590
github.com/actions/actions-runner-controller/github/actions.(*Client).Do
        github.com/actions/actions-runner-controller/github/actions/client.go:274
github.com/actions/actions-runner-controller/github/actions.(*Client).GetMessage
        github.com/actions/actions-runner-controller/github/actions/client.go:578
github.com/actions/actions-runner-controller/cmd/ghalistener/listener.(*Listener).getMessage
        github.com/actions/actions-runner-controller/cmd/ghalistener/listener/listener.go:272
github.com/actions/actions-runner-controller/cmd/ghalistener/listener.(*Listener).Listen
        github.com/actions/actions-runner-controller/cmd/ghalistener/listener/listener.go:163
github.com/actions/actions-runner-controller/cmd/ghalistener/app.(*App).Run.func1
        github.com/actions/actions-runner-controller/cmd/ghalistener/app/app.go:124
golang.org/x/sync/errgroup.(*Group).Go.func1
        golang.org/x/[email protected]/errgroup/errgroup.go:78
2025-01-11T09:47:07Z    INFO    listener-app.listener   Deleting message session
2025/01/11 09:47:08 Application returned an error: failed to get message: failed to get next message: Get "https://pipelinesghubeus2.actions.githubusercontent.com/UAtuLgkhN55sFa9LjPChqErGzAtn5KmhHmxOqJmuvRJxw5lyJI/_apis/runtime/runnerscalesets/4/messages?sessionId=6c3a7d29-e084-4729-84da-d2326b4245fe&api-version=6.0-preview": GET https://pipelinesghubeus2.actions.githubusercontent.com/UAtuLgkhN55sFa9LjPChqErGzAtn5KmhHmxOqJmuvRJxw5lyJI/_apis/runtime/runnerscalesets/4/messages?sessionId=6c3a7d29-e084-4729-84da-d2326b4245fe&api-version=6.0-preview giving up after 1 attempt(s): context canceled

The argocd app will remain in the out of sync state.
image

Describe the expected behavior

The listner pod is not restarted and also the argocd app is in synced state.

Additional Context

I read the following issue. 
https://github.com/actions/actions-runner-controller/issues/3533

So, I added excludeLabelPropagationPrefixes to values.yaml
https://github.com/codequokka/argocd-poc/blob/main/helmfile/github-arc/values/arc-systems-poc.yaml

Controller Logs

https://gist.github.com/codequokka/90de8a8efbc72cf7f1cdeb2c7aa7127d

Runner Pod Logs

There is no log because the runner pod has not been started.
@codequokka codequokka added bug Something isn't working gha-runner-scale-set Related to the gha-runner-scale-set mode needs triage Requires review from the maintainers labels Jan 11, 2025
Copy link
Contributor

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.

@codequokka
Copy link
Author

I changed the argocd resourceTrackingMethod to annotation, and the app is now synced as expected.
However, I do not know why it became as expected.

configs:
  cm:
    application.resourceTrackingMethod: annotation

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gha-runner-scale-set Related to the gha-runner-scale-set mode needs triage Requires review from the maintainers
Projects
None yet
Development

No branches or pull requests

1 participant