cloudbase / garm

GitHub Actions Runner Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GCP Provider error startup-script: Must not run with sudo

Hdom opened this issue · comments

Hello, running into an error trying to spin up a linux runner in GCP using the garm_provider_gcp.

Feb 29 16:12:57 debian google_metadata_script_runner[903]: startup-script: Must not run with sudo
Feb 29 16:13:02 debian google_metadata_script_runner[903]: startup-script: Must not run with sudo

Any idea of what I am doing wrong?

I was thinking of some workarounds:

  1. I can add export RUNNER_ALLOW_RUNASROOT="1" as outlined on https://serverfault.com/questions/1052695/must-not-run-with-sudo-while-trying-to-create-a-runner-using-github-actions but this is not ideal.
  2. Switch to runner user sudo su runner in the additionalCommands section of the ComposeUserData at https://github.com/cloudbase/garm-provider-gcp/blob/main/internal/spec/spec.go#L215.

Hi @Hdom !

Would you mind opening this issue against the garm-provider-gcp repo?

Hi @Hdom !

Would you mind opening this issue against the garm-provider-gcp repo?

Done cloudbase/garm-provider-gcp#10 closing this one