circleci-cli icon indicating copy to clipboard operation
circleci-cli copied to clipboard

circleci local execute doesn't work when using /mnt/ramdisk

Open Dunedan opened this issue 4 years ago • 0 comments

Meta:

CircleCI CLI Version: 0.1.11540+55a9ecc (release)

Operating System: Debian sid


Current behavior:

CircleCI supports using a ramdisk available at /mnt/ramdisk since last summer (https://circleci.com/blog/the-issue-of-speed-and-determinism-in-ci/). However trying to use /mnt/ramdisk as working_directory when using the CircleCI CLI locally causes the job to fail.

Here is a minimal example of a CircleCI configuration to reproduce this problem:

---
version: 2.1

jobs:
  build:
    docker:
      - image: cimg/base:stable
    working_directory: /mnt/ramdisk
    steps:
      - run:
          command: echo "hello world"

Running this locally results in the following error:

$ circleci local execute
Docker image digest: sha256:7648229d02b64bfad35034b1e0842060eb92414ff79677659003eb35c4348d7d
====>> Spin up Environment
Build-agent version 1.0.22204-ad5953b4 (2019-12-11T10:53:00+0000)
Docker Engine Version: 20.10.1+dfsg1
Kernel Version: Linux 51a274bc888c 5.10.0-1-amd64 #1 SMP Debian 5.10.4-1 (2020-12-31) x86_64 Linux
Starting container cimg/base:stable
  using image cimg/base@sha256:92748b098b1e5034226191fe307f5d9884ec86c88eede2903e01a16ab19f7209

Using build environment variables
  BASH_ENV=/tmp/.bash_env-localbuild-1609922105
  CI=true
  CIRCLECI=true
  CIRCLE_BRANCH=
  CIRCLE_BUILD_NUM=
  CIRCLE_JOB=build
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_REPOSITORY_URL=
  CIRCLE_SHA1=
  CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1609922105
  CIRCLE_WORKING_DIRECTORY=/mnt/ramdisk


The redacted variables listed above will be masked in run step output

====>> echo "hello world"
  #!/bin/bash -eo pipefail
echo "hello world"
Error: 
Unable to create directory '/mnt/ramdisk': mkdir /mnt/ramdisk: permission denied

Step failed
Error: runner failed (exited with 101)
Task failed
Error: task failed

Expected behavior:

Using /mnt/ramdisk as working_directory should not cause jobs to fail when running locally, as it's working with CircleCI as well. From my perspective /mnt/ramdisk doesn't have to be an actual ramdisk when running locally, a regular directory would be fine for me. I just would like to not have such jobs failing anymore.

When did this begin / Was this previously working?:

As far as I'm aware this is something which was never working in the past.

Dunedan avatar Jan 06 '21 08:01 Dunedan