summaryrefslogtreecommitdiff
path: root/pkg/machine/qemu/config.go
diff options
context:
space:
mode:
authorcdoern <cbdoer23@g.holycross.edu>2022-04-12 22:21:33 -0400
committercdoern <cbdoer23@g.holycross.edu>2022-04-25 14:14:45 -0400
commitd441a711e5590cc579ae0e0a73ea463718d4d79e (patch)
tree415249c671acb4223867b879749efa5221786fe9 /pkg/machine/qemu/config.go
parentba6356280a86531d3cda7016859aef98bb3d8272 (diff)
downloadpodman-d441a711e5590cc579ae0e0a73ea463718d4d79e.tar.gz
podman-d441a711e5590cc579ae0e0a73ea463718d4d79e.tar.bz2
podman-d441a711e5590cc579ae0e0a73ea463718d4d79e.zip
machine starting status
podman machine was using the file modification time to get the running status add three new config entries Starting (bool) Created (time) LastUp (time) to actually keep track of when these events happened. This means we can use the config file to actually store this data and not mess up the created/last-up time. This fixes the issues where the machine would report running 15 seconds before it was up. Also fixes the issue of modifying the file manually and saying the machine is "up" [NO NEW TESTS NEEDED] resolves #13711 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Diffstat (limited to 'pkg/machine/qemu/config.go')
-rw-r--r--pkg/machine/qemu/config.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/machine/qemu/config.go b/pkg/machine/qemu/config.go
index e9416dc36..840bd5c59 100644
--- a/pkg/machine/qemu/config.go
+++ b/pkg/machine/qemu/config.go
@@ -86,6 +86,12 @@ type MachineVM struct {
ResourceConfig
// SSHConfig for accessing the remote vm
SSHConfig
+ // Starting tells us whether the machine is running or if we have just dialed it to start it
+ Starting bool
+ // Created contains the original created time instead of querying the file mod time
+ Created time.Time
+ // LastUp contains the last recorded uptime
+ LastUp time.Time
}
// ImageConfig describes the bootable image for the VM