summaryrefslogtreecommitdiff
path: root/pkg/machine
diff options
context:
space:
mode:
authorAnders F Björklund <anders.f.bjorklund@gmail.com>2022-01-21 08:10:13 +0100
committerAnders F Björklund <anders.f.bjorklund@gmail.com>2022-01-21 16:43:48 +0100
commite834297b39d415a9df3d5e56a7587e84b49e8d6c (patch)
tree4a41167dd272fe0f4be86da303664f89b3465c0e /pkg/machine
parent993c072029fb2c3938d3685ca7e38b5eab29c400 (diff)
downloadpodman-e834297b39d415a9df3d5e56a7587e84b49e8d6c.tar.gz
podman-e834297b39d415a9df3d5e56a7587e84b49e8d6c.tar.bz2
podman-e834297b39d415a9df3d5e56a7587e84b49e8d6c.zip
Restore machine start logic that was hanging
After refactoring Stop(), mounting volumes was hanging in Start(). Restore the conditional, and add error reporting from isListening. [NO NEW TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
Diffstat (limited to 'pkg/machine')
-rw-r--r--pkg/machine/qemu/machine.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index e1870f1ac..eb7b35ece 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -390,12 +390,14 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
if err != nil {
return err
}
- for running || !v.isListening() {
+ listening := v.isListening()
+ for !running || !listening {
time.Sleep(100 * time.Millisecond)
running, err = v.isRunning()
if err != nil {
return err
}
+ listening = v.isListening()
}
}
for _, mount := range v.Mounts {