This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1351787 - pminfo --container=CODE proc.* metrics missing
pminfo --container=CODE proc.* metrics missing
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: pcp (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: pcp-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-30 16:42 EDT by Frank Ch. Eigler
Modified: 2017-08-08 11:12 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-08 11:12:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Frank Ch. Eigler 2016-06-30 16:42:26 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.
Comment 1 Frank Ch. Eigler 2016-07-01 11:25:33 EDT
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)
Comment 2 Fedora End Of Life 2017-07-25 17:28:10 EDT
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.
Comment 3 Fedora End Of Life 2017-08-08 11:12:59 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.