Podman new rest API for stats does not report an error when in rootless mode on cgroupv1 system
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libpod (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
root@ubuntu:~# lsb_release -rd
Description: Ubuntu 21.04
Release: 21.04
root@ubuntu:~# dpkg -s podman | grep Version
Version: 3.0.1+dfsg1-
I am running all the cmds below as admin non root user.
There is this running container under admin user:
admin@ubuntu:~$ podman ps --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
39499f3da7a1 busybox:latest sh 6 minutes ago Up 6 minutes ago swamped-crate
Using the old API (deprecated) to list stats for this container I (as expected get an error)
admin@ubuntu:~$ curl --unix-socket /run/user/
{"cause":"no support for CGroups V1 in rootless environments"
Using the new API (recommended) to list stats, there is not any error and of course not stats.
admin@ubuntu:~$ curl --unix-socket /run/user/
{"Error"
The expected result if that the new stats API will also print an error like the old one.
admin@ubuntu:~$ podman info
host:
arch: amd64
buildahVersion: 1.19.6
cgroupManager: cgroupfs
cgroupVersion: v1
conmon:
package: 'conmon: /usr/bin/conmon'
path: /usr/bin/conmon
version: 'conmon version 2.0.25, commit: unknown'
cpus: 1
distribution:
distribution: ubuntu
version: "21.04"
eventLogger: journald
hostname: ubuntu
idMappings:
gidmap:
- container_id: 0
host_id: 1001
size: 1
- container_id: 1
host_id: 100000
size: 65536
uidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 100000
size: 65536
kernel: 5.11.0-34-generic
linkmode: dynamic
memFree: 416464896
memTotal: 1149898752
ociRuntime:
name: runc
package: 'runc: /usr/sbin/runc'
path: /usr/sbin/runc
version: |-
runc version 1.0.0~rc95-
spec: 1.0.2-dev
go: go1.16.2
libseccomp: 2.5.1
os: linux
remoteSocket:
exists: true
path: /run/user/
security:
apparmorEna
capabilities: CAP_CHOWN,
rootless: true
seccompEnabled: true
selinuxEnabled: false
slirp4netns:
executable: /usr/bin/
package: 'slirp4netns: /usr/bin/
version: |-
slirp4netns version 1.0.1
commit: 6a7b16babc95b6a
libslirp: 4.4.0
swapFree: 0
swapTotal: 0
uptime: 7m 49.13s
registries: {}
store:
configFile: /home/admin/
containerStore:
number: 1
paused: 0
running: 1
stopped: 0
graphDriverName: overlay
graphOptions:
overlay.
Executable: /usr/bin/
Package: 'fuse-overlayfs: /usr/bin/
Version: |-
fusermount3 version: 3.10.2
FUSE library version 3.10.2
using FUSE kernel interface version 7.31
graphRoot: /home/admin/
graphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "false"
Supports d_type: "true"
Using metacopy: "false"
imageStore:
number: 3
runRoot: /run/user/
volumePath: /home/admin/
version:
APIVersion: 3.0.0
Built: 0
BuiltTime: Thu Jan 1 00:00:00 1970
GitCommit: ""
GoVersion: go1.16
OsArch: linux/amd64
Version: 3.0.1