diff options
author | Shane Smith <shane.smith@shopify.com> | 2022-06-15 14:58:08 -0400 |
---|---|---|
committer | Shane Smith <shane.smith@shopify.com> | 2022-06-28 13:28:38 -0400 |
commit | 59a7ac210b56865540131c73777a90ebe96c591c (patch) | |
tree | 601a2ec2d5f07e8c07dbc1eb1d2a046b232dd07e /pkg/machine/qemu/config.go | |
parent | 8f79604864412a05d5d1b8614cb356f5b481306b (diff) | |
download | podman-59a7ac210b56865540131c73777a90ebe96c591c.tar.gz podman-59a7ac210b56865540131c73777a90ebe96c591c.tar.bz2 podman-59a7ac210b56865540131c73777a90ebe96c591c.zip |
Make `podman machine stop` wait for qemu to exit
- New `VMPidFilePath` field in MachineVM config holds the path for the
qemu PID file
- qemu is now started with the `-pidfile` argument set to `VMPidFilePath`
- Machines created before this won't have the VM PID file configured,
stopping these VMs will revert back to waiting on the state to change
away from `Running`, plus an added 2s sleep to give time for the VM to
exit and to avoid potential issues
- Machines created after this will have a VM PID file configured and
stopping the machine will wait indefinitely for the VM to exit
[NO NEW TESTS NEEDED]
Signed-off-by: Shane Smith <shane.smith@shopify.com>
Diffstat (limited to 'pkg/machine/qemu/config.go')
-rw-r--r-- | pkg/machine/qemu/config.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/machine/qemu/config.go b/pkg/machine/qemu/config.go index 56c95e3b3..bada1af9b 100644 --- a/pkg/machine/qemu/config.go +++ b/pkg/machine/qemu/config.go @@ -72,8 +72,10 @@ type MachineVM struct { Mounts []machine.Mount // Name of VM Name string - // PidFilePath is the where the PID file lives + // PidFilePath is the where the Proxy PID file lives PidFilePath machine.VMFile + // VMPidFilePath is the where the VM PID file lives + VMPidFilePath machine.VMFile // QMPMonitor is the qemu monitor object for sending commands QMPMonitor Monitor // ReadySocket tells host when vm is booted |