Right now, SubsystemMountpoints() will calculate the V2 mountpoint by iterating through /proc/self/mountpoints and and updating the V2Loc as it finds it in the file, ending with the last result. Problem is, some mountpoints files look like this:
In this case, the last mountpoint is /hostfs/var/lib/docker/overlay2/1b570230fa3ec3679e354b0c219757c739f91d774ebc02174106488606549da0/merged/sys/fs/cgroup
Problem is, this is a docker overlayfs path, and if the container is running as non-root --user=whomever, then we can't read from this file.
The hostfs path works fine:
cat /hostfs/sys/fs/cgroup/user.slice/user-1000.slice/session-1763.scope/io.pressure
some avg10=0.00 avg60=0.00 avg300=0.00 total=2256657
full avg10=0.00 avg60=0.00 avg300=0.00 total=1667639
Right now,
SubsystemMountpoints()
will calculate the V2 mountpoint by iterating through/proc/self/mountpoints
and and updating theV2Loc
as it finds it in the file, ending with the last result. Problem is, somemountpoints
files look like this:In this case, the last mountpoint is
/hostfs/var/lib/docker/overlay2/1b570230fa3ec3679e354b0c219757c739f91d774ebc02174106488606549da0/merged/sys/fs/cgroup
Problem is, this is a docker overlayfs path, and if the container is running as non-root
--user=whomever
, then we can't read from this file.The hostfs path works fine: