GCP Provider error startup-script: Must not run with sudo
Hdom opened this issue · comments
DennysO commented
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:
- 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. - 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.
Gabriel commented
Hi @Hdom !
Would you mind opening this issue against the garm-provider-gcp repo?
Gabriel commented
CC @fabi200123
DennysO commented
Hi @Hdom !
Would you mind opening this issue against the garm-provider-gcp repo?
Done cloudbase/garm-provider-gcp#10 closing this one