Skip to content

Error response from daemon: cgroup-parent for systemd cgroup should be a valid slice named as "xxx.slice" #935

@boredazfcuk

Description

@boredazfcuk

Hi,

I've upgraded my system to Debian Bullseye and now I can no longer build containers as I get this error:

 => ERROR [internal] booting buildkit                                                                                                                                           0.0s
 => => starting container buildx_buildkit_builder0                                                                                                                        0.0s
------
 > [internal] booting buildkit:
------
error: Error response from daemon: cgroup-parent for systemd cgroup should be a valid slice named as "xxx.slice"

Docker info:

Client: Docker Engine - Community
 Version:           20.10.12
 API version:       1.41
 Go version:        go1.16.12
 Git commit:        e91ed57
 Built:             Mon Dec 13 11:45:37 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.12
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.12
  Git commit:       459d0df
  Built:            Mon Dec 13 11:43:46 2021
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          1.4.12
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

My container details from docker inspect buildx_buildkit_builder0:
https://pastebin.com/uqq6ZMZX

A bit of Googling tells me that Bullseye has implemented cgroups v2.

Things I've tried that haven't worked...

Reverting to cgroups v1, by editing /etc/default/group with the two lines beneath, running update-grub and then rebooting

GRUB_CMDLINE_LINUX_DEFAULT="systemd.unified_cgroup_hierarchy=0"
GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=0"

Editing /etc/docker/daemon.json to add the line beneath and then restarting the docker service:

   "exec-opts": ["native.cgroupdriver=systemd"],

Any other ideas?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions