cloudbase / garm

GitHub Actions Runner Manager
Apache License 2.0
136 stars 26 forks source link

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

Closed Hdom closed 9 months ago

Hdom commented 9 months ago

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.
gabriel-samfira commented 9 months ago

Hi @Hdom !

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

gabriel-samfira commented 9 months ago

CC @fabi200123

Hdom commented 9 months ago

Hi @Hdom !

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

Done https://github.com/cloudbase/garm-provider-gcp/issues/10 closing this one