Comment 7 for bug 1654310

Revision history for this message
Christian Brauner (cbrauner) wrote : Re: [Bug 1654310] Re: lxcfs: update the 'btime' field in /proc/stat to reflect guest boot time not host

On Mon, Jun 19, 2017 at 04:28:07PM -0000, Jason Baron wrote:
> Ok, I guess we could intercept the /proc/<pid>/stat read() call and
> overwrite the starttime there with the correct value? That is, add the
> starttime from /proc/<pid>/stat to the host boot time and then subtract
> that from the guest boot time.

We can't really do that since this is equivalent to over-mounting /proc itself.
Instead, we have reverted the "btime" virtualization patch for now and we'll
likely include this in the next round of SRUs.

>
> --
> You received this bug notification because you are a member of Ubuntu
> containers team, which is subscribed to lxcfs in Ubuntu.
> Matching subscriptions: lxcfs
> https://bugs.launchpad.net/bugs/1654310
>
> Title:
> lxcfs: update the 'btime' field in /proc/stat to reflect guest boot
> time not host
>
> Status in lxcfs package in Ubuntu:
> Fix Released
>
> Bug description:
> The 'btime' field in /proc/stat reflects the host boot time and not
> the time that the guest container has started.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/lxcfs/+bug/1654310/+subscriptions