Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I install crun and change default runtime in libpod.conf to crun, but running podman stats --all still produce error
Steps to reproduce the issue:
install crun
change runtime in libpod.conf to crun
run podman stats --all
Describe the results you received:
Error: stats is not supported in rootless mode without cgroups v2
Describe the results you expected:
See all container
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
Version: 1.5.1
RemoteAPI Version: 1
Go Version: go1.12.8
OS/Arch: linux/amd64
Output of podman info --debug:
debug:
compiler: gc
git commit: ""
go version: go1.12.8
podman version: 1.5.1
host:
BuildahVersion: 1.10.1
Conmon:
package: Unknown
path: /usr/bin/conmon
version: 'conmon version 2.0.0, commit: e217fdff82e0b1a6184a28c43043a4065083407f'
Distribution:
distribution: manjaro
version: unknown
MemFree: 861356032
MemTotal: 16726908928
OCIRuntime:
package: Unknown
path: /usr/bin/crun
version: |-
crun 0.8
spec: 1.0.0
+SYSTEMD +CAP +SECCOMP +EBPF +YAJL
SwapFree: 2982395904
SwapTotal: 2999971840
arch: amd64
cpus: 8
eventlogger: journald
hostname: duc-pc
kernel: 4.19.69-1-MANJARO
os: linux
rootless: true
uptime: 3h 20m 20.41s (Approximately 0.12 days)
registries:
blocked: null
insecure: null
search:
- docker.io
- registry.fedoraproject.org
- quay.io
- registry.access.redhat.com
- registry.centos.org
store:
ConfigFile: /home/hongduc/.config/containers/storage.conf
ContainerStore:
number: 1
GraphDriverName: vfs
GraphOptions: null
GraphRoot: /home/hongduc/.local/share/containers/storage
GraphStatus: {}
ImageStore:
number: 14
RunRoot: /run/user/1000
VolumePath: /home/hongduc/.local/share/containers/storage/volumes
Package info (e.g. output of rpm -q podman or apt list podman):
community/podman 1.5.1-1
Additional environment details (AWS, VirtualBox, physical, etc.):
> grep cgroup /proc/filesystems
nodev cgroup
nodev cgroup2
> cat ~/.config/containers/libpod.conf
volume_path = "/home/hongduc/.local/share/containers/storage/volumes"
image_default_transport = "docker://"
runtime = "crun"
runtime_supports_json = ["runc"]
conmon_path = ["/usr/libexec/podman/conmon", "/usr/local/libexec/podman/conmon", "/usr/local/lib/podman/conmon", "/usr/bin/conmon", "/usr/sbin/conmon", "/usr/local/bin/conmon", "/usr/local/sbin/conmon", "/run/current-system/sw/bin/conmon"]
conmon_env_vars = ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"]
cgroup_manager = "cgroupfs"
init_path = ""
static_dir = "/home/hongduc/.local/share/containers/storage/libpod"
tmp_dir = "/run/user/1000/libpod/tmp"
max_log_size = -1
no_pivot_root = false
cni_config_dir = "/etc/cni/net.d/"
cni_plugin_dir = ["/usr/libexec/cni", "/usr/lib/cni", "/usr/local/lib/cni", "/opt/cni/bin"]
infra_image = "k8s.gcr.io/pause:3.1"
infra_command = "/pause"
enable_port_reservation = true
label = true
network_cmd_path = ""
num_locks = 2048
lock_type = "shm"
events_logger = "journald"
-events_logfile_path = ""
detach_keys = "ctrl-p,ctrl-q"
[runtimes]
crun = ["/usr/bin/crun", "/usr/local/bin/crun"]
runc = ["/usr/bin/runc", "/usr/sbin/runc", "/usr/local/bin/runc", "/usr/local/sbin/runc", "/sbin/runc", "/bin/runc", "/usr/lib/cri-o-runc/sbin/runc", "/run/current-system/sw/bin/runc"]
Hi @hong-duc, thanks for opening the issue. Are you running your system on Cgroups v2? Changing the runtime to crun is not sufficient.
Cc: @giuseppe
Yes, it seems to work locally on cgroups v2 so I guess you are still using cgroups v1.
What do you get with stat -c %T -f /sys/fs/cgroup?
If you run on cgroups v2 you should see: "cgroup2fs"
To enable cgroups v2, please add "systemd.unified_cgroup_hierarchy=1" to your kernel command line
It work, thank you, I search google and never find anything mention that I have to enable it, all article say that cgroups v2 enable by default. It all working now thank you very much :smile:
Most helpful comment
Yes, it seems to work locally on cgroups v2 so I guess you are still using cgroups v1.
What do you get with
stat -c %T -f /sys/fs/cgroup?If you run on cgroups v2 you should see: "cgroup2fs"
To enable cgroups v2, please add "systemd.unified_cgroup_hierarchy=1" to your kernel command line