cli icon indicating copy to clipboard operation
cli copied to clipboard

Warning: Kernel Does Not Support cpuset or Cgroup Not Mounted

Open byteshiva opened this issue 10 months ago • 0 comments

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

byteshiva avatar Apr 02 '24 15:04 byteshiva