process start times offset by host uptime
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I noticed that the process start times in my LXDs appear to be offset by host's uptime at the time the container was booted. For example:
[agnew(~)] uptime
16:18:12 up 5 days, 6:15, 15 users, load average: 0.29, 0.36, 0.51
[agnew(mojo-vault)] lxc launch ubuntu:16.04
Creating prime-shiner
Starting prime-shiner
[agnew(~)] lxc exec prime-shiner /bin/su -
mesg: ttyname failed: Success
root@prime-
Sun Jun 25 10:34:52 2017
root@prime-
Tue Jun 20 04:18:56 UTC 2017
root@prime-
Sun Jun 25 10:34:27 UTC 2017
root@prime-
And in a container that was rebooted yesterday:
[agnew(~)] lxc exec openstack /bin/su -
mesg: ttyname failed: Success
root@openstack:~# date
Tue Jun 20 04:22:42 UTC 2017
root@openstack:~# ps -o lstart 1
Fri Jun 23 06:09:34 2017
root@openstack:~# ps -o lstart $$
Sat Jun 24 08:26:11 2017
root@openstack:~# _
Version information:
[agnew(~)] lsb_release -rc
Release: 17.04
Codename: zesty
[agnew(~)] uname -a
Linux agnew 4.10.0-22-generic #24-Ubuntu SMP Mon May 22 17:43:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[agnew(~)] dpkg-query -W linux-image-$(uname -r) lxd
linux-image-
lxd 2.12-0ubuntu3
My kernel above is downrev, but this also happens with the current zesty kernel:
[agnew(~)] uname -a
STARTED
Linux agnew 4.10.0-24-generic #28-Ubuntu SMP Wed Jun 14 08:14:34 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[agnew(~)] uptime
16:47:57 up 5 min, 3 users, load average: 0.46, 1.13, 0.63
[agnew(~)] lxc exec openstack /bin/su -
mesg: ttyname failed: Success
root@openstack:~# date ; ps -o lstart $$
Tue Jun 20 04:48:00 UTC 2017
Tue Jun 20 04:48:45 2017
root@openstack:~# logout
The container was started on boot, so 45 seconds sounds about right.
And then if I restart the container, the offset becomes larger:
[agnew(~)] lxc restart openstack
STARTED
[agnew(~)] lxc exec openstack /bin/su -
mesg: ttyname failed: Success
root@openstack:~# date ; ps -o lstart $$
Tue Jun 20 04:48:43 UTC 2017
Tue Jun 20 04:54:46 2017
root@openstack:~# logout