Skip to content

Commit 54bc5b5

Browse files
committed
limactl stop: extend the timeout for waiting for the hostAgent to stop
Currently, both the timeout for waiting for the hostAgent to stop in `limactl stop` and the timeout for `LimaQemuDriver.Stop()` calling `shutdownQEMU()` are set to 3 minutes. https://github.com/lima-vm/lima/blob/6fa914519f9412519fee64619755aa4a9b3774f9/pkg/qemu/qemu_driver.go#L204 As a result, the `limactl stop` might time out before QEMU is forcibly terminated, leading to the error: > level=fatal msg="did not receive an event with the \"exiting\" status" With this change, `limactl stop` should be able to receive the `"status":{"exiting":true}` event output by the hostAgent after it has forcibly terminated QEMU, preventing `limactl stop` from resulting in an error. Signed-off-by: Norio Nomura <[email protected]>
1 parent 6fa9145 commit 54bc5b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/limactl/stop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func stopInstanceGracefully(inst *store.Instance) error {
7575
}
7676

7777
func waitForHostAgentTermination(ctx context.Context, inst *store.Instance, begin time.Time) error {
78-
ctx2, cancel := context.WithTimeout(ctx, 3*time.Minute)
78+
ctx2, cancel := context.WithTimeout(ctx, 3*time.Minute+10*time.Second)
7979
defer cancel()
8080

8181
var receivedExitingEvent bool

0 commit comments

Comments
 (0)