[feat] custom graceful stop timeout
- Dominant language
- Go
- Stars
- 21.9k
- Forks
- 957
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 53
Description
### Description
# feat
custom graceful stop timeout
## background
I found:
Currently, graceful stop will wait for 3m, then enforce stop.
Try to figure out how to custom graceful stop timeout.
But seems no way, due to hard code.
https://github.com/lima-vm/lima/blob/master/pkg/driver/qemu/qemu_driver.go#L446-L448
```go
func (l *LimaQemuDriver) Stop(ctx context.Context) error {
return l.shutdownQEMU(ctx, 3*time.Minute, l.qCmd, l.qWaitCh)
}
```
## actual
graceful stop timeout is hard code as 3m
# expected
custom graceful stop timeout
Contributor guide
Research direction
Start in pkg/driver/qemu/qemu_driver.go at LimaQemuDriver.Stop and trace how shutdownQEMU receives the current three-minute timeout. Identify the existing configuration path and tests around stopping, then make the graceful-stop timeout configurable and verify that the selected duration is used before enforcement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100