Skip to content

Commit

Permalink
Restore machine start logic that was hanging
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
afbjorklund committed Jan 21, 2022
1 parent 993c072 commit e834297
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/machine/qemu/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e834297

Please sign in to comment.