-
Couldn't load subscription status.
- Fork 881
rkt: show prepared/created/exited times in rkt list #1726
Conversation
|
Isn't modification timestamp propagated down the directory tree, so |
af1707e to
9142c92
Compare
AFAIK, the mtime of a directory changes when the files directly underneath change, but not when the "grandchildren" change. |
9142c92 to
5f6ac7a
Compare
|
One annoying thing is that the word "WHEN" works for Suggestions? |
|
SINCE seems reasonable to me. |
5f6ac7a to
133fda8
Compare
|
This is broken in KVM because it doesn't create any lock files in |
133fda8 to
22e2712
Compare
|
Added a patch to kvm to touch |
|
What happens in the case that kvm dies ungracefully? On Thu, Nov 12, 2015, 08:03 Iago López Galeiras [email protected]
|
If you send SIGTERM or SIGKILL it doesn't work. With nspawn, after sending SIGTERM things are ok but SIGKILL breaks the behavior. Maybe we should just show creation time? |
|
Suggestion from @vcaputo: #1789 (comment) |
To get the pod preparation/creation time we use the modification time in `/var/lib/rkt/pods/*/<UUID>`. It gets modified when the pod is prepared and when the pod is created and doesn't change afterwards. To get the pod exit time we use the modification time in `/var/lib/rkt/pods/*/<UUID>/stage1`. The reason is that systemd-nspawn creates a lock file there, and removes it when the container exits (even if it was killed).
22e2712 to
5793977
Compare
5793977 to
73ab626
Compare
|
Since we can't think of a reliable way to get the exited times and we're fine for now with created/start times, I'm closing this in favor of #2030 |
To get the pod preparation/creation time we use the modification time in
/var/lib/rkt/pods/*/<UUID>. It gets modified when the pod is preparedand when the pod is created and doesn't change afterwards.
To get the pod exit time we use the modification time in
/var/lib/rkt/pods/*/<UUID>/stage1. The reason is that systemd-nspawncreates a lock file there, and removes it when the container exits (even
if it was killed).
Fixes #1428
Fixes #1429