Cannot overwrite RUNNER_TOOL_CACHE variable, container fails to start with default value #184

Open
opened 2024-04-20 07:18:35 +00:00 by Szwendacz · 1 comment

I am trying to run an action in container from image quay.io/fedora/fedora-coreos:stable
In this image /opt is a link to /var/opt and that is probably why on action "set up job" stage it fails with error:

failed to start container: Error response from daemon: crun: creating `/opt/hostedtoolcache`: openat2 `opt`: No such file or directory: OCI runtime attempted to invoke a command that was not found

I am trying to overwrite variable RUNNER_TOOL_CACHE to /var/hostedtoolcache, setting it in environment of runner and podman(used instead of docker), and in runner config.yaml as follows:

runner:
  # Extra environment variables to run jobs.
  envs:
    RUNNER_TOOL_CACHE: "/var/hostedtoolcache"

But this variable still stays the same:

ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8]

My setup is rather custom - I run this setup in kubernetes - single pod with 2 containers - one with runner, other with podman

label that have image that is failing: "coreos:docker://quay.io/fedora/fedora-coreos:stable"
other label that is working properly: "amd64:docker://quay.io/podman/stable"

I can provide more info if needed.

I am trying to run an action in container from image quay.io/fedora/fedora-coreos:stable In this image `/opt` is a link to `/var/opt` and that is probably why on action "set up job" stage it fails with error: ``` failed to start container: Error response from daemon: crun: creating `/opt/hostedtoolcache`: openat2 `opt`: No such file or directory: OCI runtime attempted to invoke a command that was not found ``` I am trying to overwrite variable RUNNER_TOOL_CACHE to `/var/hostedtoolcache`, setting it in environment of runner and podman(used instead of docker), and in runner `config.yaml` as follows: ```yaml runner: # Extra environment variables to run jobs. envs: RUNNER_TOOL_CACHE: "/var/hostedtoolcache" ``` But this variable still stays the same: ``` ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8] ``` My setup is rather custom - I run this setup in kubernetes - single pod with 2 containers - one with runner, other with podman label that have image that is failing: `"coreos:docker://quay.io/fedora/fedora-coreos:stable"` other label that is working properly: `"amd64:docker://quay.io/podman/stable"` I can provide more info if needed.
Member

I can reproduce it. After pre-investigation it's an upstream act limitation.

Runner calls act underneath and act has hardcoded mount to /opt/hostedtoolcache.

There's a possibility that it's possible to overwrite the envvar set by act, but I wasn't able to do that yet.

I can reproduce it. After pre-investigation it's an upstream act limitation. Runner calls act underneath and act has hardcoded mount to `/opt/hostedtoolcache`. There's a possibility that it's possible to overwrite the envvar set by act, but I wasn't able to do that yet.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: forgejo/runner#184
No description provided.