One of my favorite CircleCI features stopped working for me recently: local builds using circleci
CLI.
Here’s the error:
Error:
Unexpected environment preparation error: error looking up cgroup: not implemented for cgroup v2 unified hierarchy
FWIW, this used to work fine a few weeks ago.
I tried deleting: ~/.circleci/build_agent_settings.json
Also prune all my docker stuff via:
docker system prune --all
More details:
MacOS: 12.0.1 (21A559)
$ circleci version
0.1.16535+5010eb7 (homebrew)
Command:
$ circleci local execute -c .circleci/local-config.yml --job 'build'
Docker image digest: sha256:d1c138870d351735f88da6ce191aaa88bff32872d238e95df01d0d5b1a5ef88b
====>> Spin up environment
Build-agent version ()
System information:
Server Version: 20.10.11
Storage Driver: overlay2
Backing Filesystem: extfs
Cgroup Driver: cgroupfs
Cgroup Version: 2
Kernel Version: 5.10.76-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
Error:
Unexpected environment preparation error: error looking up cgroup: not implemented for cgroup v2 unified hierarchy
Step failed
Task failed
Error: Unhandled prepare executor error: error looking up cgroup: not implemented for cgroup v2 unified hierarchy
Any suggestions?
2 Likes
Also seeing this with the latest CLI (0.1.16535) when using macOS with Docker Desktop 4.3.0. It wasn’t a problem with Docker 4.2.0.
Maybe it’s related to this in the Docker 4.3.0 changelog :
Docker Desktop now uses cgroupv2. If you need to run systemd
in a container then…
opened 09:39AM - 16 Apr 21 UTC
bug
## Meta:
**CircleCI CLI Version:**
0.1.15195+595cc9e (release)
**Operatin… g System:**
Arch Linux (latest)
**CircleCI CLI Diagnostic:**
```
---
CircleCI CLI Diagnostics
---
Debugger mode: false
Config found: /home/ldorau/.circleci/cli.yml
API host: https://circleci.com
API endpoint: graphql-unstable
OK, got a token.
Trying an introspection query on API...
Ok.
Hello, Lukasz Dorau.
```
---
## Current behavior:
```
$ circleci local execute
Docker image digest: sha256:fc6b14595a231dd8417c97fad26f5f5f294f64b6f58443d93dfba17186f9f738
====>> Spin up environment
Build-agent version ()
System information:
Server Version: 20.10.6
Storage Driver: overlay2
Backing Filesystem: extfs
Cgroup Driver: systemd
Cgroup Version: 2
Kernel Version: 5.9.14-arch1-1
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
Error:
Unexpected environment preparation error: error looking up cgroup: not implemented for cgroup v2 unified hierarchy
Step failed
Task failed
Error: Unhandled prepare executor error: error looking up cgroup: not implemented for cgroup v2 unified hierarchy
```
## Expected behavior:
"circleci local execute" works
## When did this begin?
Now
## Was this previously working?:
No, never.
Hey folks wanted to provide an update on this issue, we recently pushed a fix that we believe addresses this issue on both macOS and Linux. Details are in the GitHub issue I linked above. If you are still seeing issues, do not hesitate to comment in either this post or the GitHub Issue.
1 Like
Thanks! After running the suggested: rm ~/.circleci/build_agent_settings.json
, all was well again with local CircleCI builds. Joy!
1 Like
Thanks, that fixed it on my MacBook
system
Closed
January 24, 2022, 10:56pm
6
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.