Warning: Kernel Does Not Support cpuset or Cgroup Not Mounted
Open
Nobody has claimed this yet.
kind/bug
status/0-triage
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
Description:
When attempting to run the following command:
docker run --cpuset-cpus="20" hello-world
I encountered the following warning:
WARNING: Your kernel does not support cpuset or the cgroup is not mounted. Cpuset discarded.
Reproduce
$ docker run --cpuset-cpus=“20” hello-world
WARNING: Your kernel does not support cpuset or the cgroup is not mounted. Cpuset discarded.
Expected behavior
The command should execute without any warnings or errors.
docker version
docker version
Client:
Version: 20.10.25
API version: 1.41
Go version: go1.20.8
Git commit: v20.10.25
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.25
API version: 1.41 (minimum version 1.12)
Go version: go1.20.8
Git commit: v20.10.25
Built: Tue Jan 1 00:00:00 1980
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.7.1
GitCommit: v1.7.1
runc:
Version: 1.1.5
GitCommit:
docker-init:
Version: 0.19.0
GitCommit:
docker info
docker info
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.10.4)
compose: Docker Compose (Docker Inc., 2.18.1)
Server:
Containers: 26
Running: 1
Paused: 0
Stopped: 25
Images: 41
Server Version: 20.10.25
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
userxattr: true
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: v1.7.1
runc version:
init version:
Security Options:
seccomp
Profile: default
rootless
cgroupns
Kernel Version: 6.1.69
Operating System: NixOS 23.05 (Stoat)
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 46.97GiB
Name: nixos
ID: **:***
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No cpuset support
Additional Info
uname -a
Linux nixos 6.1.69 #1-NixOS SM
mount | grep cgroup2
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
Furthermore, examining the content of /proc/cgroups, it shows that cpuset is enabled:
| subsys_name | hierarchy | num_cgroups | enabled |
|-------------|-----------|-------------|---------|
| cpuset | 0 | 112 | 1 |
| cpu | 0 | 112 | 1 |
| cpuacct | 0 | 112 | 1 |
| blkio | 0 | 112 | 1 |
| memory | 0 | 112 | 1 |
| devices | 0 | 112 | 1 |
| freezer | 0 | 112 | 1 |
| net_cls | 0 | 112 | 1 |
| perf_event | 0 | 112 | 1 |
| net_prio | 0 | 112 | 1 |
| hugetlb | 0 | 112 | 1 |
| pids | 0 | 112 | 1 |
| rdma | 0 | 112 | 1 |
| misc | 0 | 112 | 1 |
| debug | 0 | 112 | 1 |
Reference:
https://docs.docker.com/config/containers/runmetrics/#control-groups
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported docker run command and comparing the supplied docker info, kernel, and cgroup details. Trace how the CLI detects cpuset support and emits the warning; done means behavior is correct for the reported configuration and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100