Re: Container Uptime Discussion

"Krzysztof Piecuch" <[email protected]> ("piecuch") Thu, 08 Feb 2024 19:40:22 +0000
Newsgroups gmane.linux.procps.devel
Message-ID <[email protected]>
Hi all,

> What that effort suggested is such code almost certainly doesn't
> belong in our library. I agree with Krzysztof that containers are a
> problem that probably should be addressed in the kernel.

I read a bunch of posts on LKML to try to get an understanding how the
problem is perceived from their side:

1. LXCFS already solves a lot of problems around containers and they
   seem to be aware that there's a need for this solution. They'll
   probably integrate some of that into kernel but there's no dire need.

2. There will be no ex. /proc/self/meminfo file because this data is
   redundant and erroneous - for container's meminfo cgroup info should
   be inspected

3. Programs should be adapted to look at container-specific data rather
   than system-wide data.

Now I don't know where our problem lies w.r.t. 2. and 3. points. There's
also a problem of defining "uptime" for container - it's not clear to me
why we should hide hosts' machine's boot time from the container's view.
Perhaps redefining "uptime" to pid 1's start time (or unshare(2)
invocation time) may be misleading for some users?

I encourage people to peek at lkml and double-check my understanding of
their position on this case. Or we can just throw the case at their
mailing list and see if it sticks.

Thanks,
Kris