-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start
is very slow
#79
Comments
Is this related to what I'm seeing right now with over 10 minutes of dots?
It's 20:07:XX as of positing this. Is there a way to verbose output the booting? I'm worried my vm has been corrupted some how. |
It's not. I mean, it kind of is, but not really. Likely,
|
I don't want to take away from the original problem, but I waited it out and got this
but checking
was the correct fix. |
In testing #78, I also noticed that the
Retry
loop surroundingExec("hwclock -s")
fails a few times every boot on my machine. It looks like it's caused by startup not yet being ready -- that is, the SSH server hasn't completely come up.Overall (especially with the current exponential backoff on
Retry
-- changed in #73) this means thatBooting...
takes around2+4+8=
14 seconds.If this loop is skipped, the
hwclock -s
is not run -- meaning the system time will not be reset based on the RTC. However, given #78, it seems that the RTC is wrong regardless after sleep and therefore this step might not be necessary.If the loop is skipped,
Start
reachesqemu/ops.go:354
beforeqemu-system-...
has finished starting the VM. It then checks for thepidfile
which is not yet present and determines thatStart
failed.However, the VM is still correctly started, and by the time the user follows up with
alpine ssh ...
,qemu-system-...
has completed startup, the pidfile has been created, and the ssh server is ready.Whatever the resolution is to #78 (either no change or some change), this
Retry
loop should instead await for one of two things to happen:qemu-system-...
exits (likely with an error/after receiving a signal)alpine.pid
is created (whichqemu-system-
seems to do late in the boot process)If 1 occurs, the VM surely did not start correctly and the pidfile should be missing (TODO: check if pidfile is cleaned up after
sigkill
).If 2 occurs, the VM likely started correctly.
This way,
Start
can wait asynchronously for bootup to finish, and then proceed when ready after a host-system-speed dependent amount of time. Instead, on slow systems,Retry
will spend many seconds sleeping after multiple failures, and on fast systems,Retry
will spend some seconds sleeping after a few failures -- in both cases waiting precious cycles and time.The text was updated successfully, but these errors were encountered: