Red Hat Bugzilla – Bug 1351787
pminfo --container=CODE proc.* metrics missing
Last modified: 2017-08-08 11:12:59 EDT
pmdaproc appears to be looking for intra-container process id lists in the wrong place on fedora 24. % docker run --rm -t -i busybox sh / # (leave it running) % docker ps elegant_mclean % pminfo --container=elegant_mclean -f proc.psinfo.pid proc.psinfo.pid No value(s) available! OK so why? strace of pmdaroot shows the usual gusher ( http://oss.sgi.com/bugzilla/show_bug.cgi?id=1110 ) of traffic whenever any --container metric is being processed. It does appear to identify the correct docker file/hexname: [...strace...] open("/var/lib/docker/containers/6d839cfc7124f8683336ddef523ffc48ea43bf5ed8f26c7a440a5e6566d2ee21/config.v2.json", O_RDONLY) = 11 close(11) = 0 stat("/var/lib/docker/containers/6d839cfc7124f8683336ddef523ffc48ea43bf5ed8f26c7a440a5e6566d2ee21/config.v2.json", {st_mode=S_IFREG|0644, st_size=2247, ...}) = 0 So why does pmdaproc have a problem? [...strace...] open("/sys/fs/cgroup/memory/system.slice/docker-HEXCODE.scope/cgroup.procs", O_RDONLY) = 6 fstat(6, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 read(6, "", 4096) = 0 close(6) = 0 note = 0 size. Indeed: % cat /sys/fs/cgroup/memory/system.slice/docker-HEXCODE.scope/cgroup.procs [empty] whereas % cat /sys/fs/cgroup/systemd/system.slice/docker-HEXCODE.scope/cgroup.procs 15584 in fact all these other /sysfs paths contain the correct cgroup.procs contents: /sys/fs/cgroup/perf_event/system.slice/docker-HEXCODE.scope/cgroup.procs:15584 /sys/fs/cgroup/pids/system.slice/docker-HEXCODE.scope/cgroup.procs:15584 /sys/fs/cgroup/devices/init.scope/system.slice/docker-HEXCODE.scope/cgroup.procs:15584 /sys/fs/cgroup/blkio/init.scope/system.slice/docker-HEXCODE.scope/cgroup.procs:15584 /sys/fs/cgroup/cpuset/system.slice/docker-HEXCODE.scope/cgroup.procs:15584 /sys/fs/cgroup/hugetlb/system.slice/docker-HEXCODE.scope/cgroup.procs:15584 /sys/fs/cgroup/freezer/system.slice/docker-HEXCODE.scope/cgroup.procs:15584 /sys/fs/cgroup/cpu,cpuacct/init.scope/system.slice/docker-HEXCODE.scope/cgroup.procs:15584 /sys/fs/cgroup/net_cls,net_prio/system.slice/docker-HEXCODE.scope/cgroup.procs:15584 /sys/fs/cgroup/memory/init.scope/system.slice/docker-HEXCODE.scope/cgroup.procs:15584 /sys/fs/cgroup/systemd/system.slice/docker-HEXCODE.scope/cgroup.procs:15584 but not /memory/system.slice/. Why not is not a question I can answer just now, but clearly pcp shouldn't look only there.
A more portable way of looking up cgroups would be: - get the pid# from pmdaroot (and cache it!) - open /proc/$pid/cgroup - find the line corresponding to the cgroup class of interest for this pmda (pids): e.g.: 10:pids:/system.slice/docker-HEXCODE.scope - construct path = /sys/fs/cgroup/pids/system.slice/docker-HEXCODE.scope - open $path/cgroup.procs (or /tasks)
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.