-
Notifications
You must be signed in to change notification settings - Fork 187
qemu: Support monitoring for failures in the initramfs #1290
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
Conversation
|
To recap the benefit here, we can make it so that |
8fed2af to
4b5fc92
Compare
4b5fc92 to
638ad99
Compare
638ad99 to
741ef59
Compare
|
Hah, that last CI failure was because in the PXE |
741ef59 to
7504c7f
Compare
|
|
||
| // WaitAll wraps the process exit as well as WaitIgnitionError, | ||
| // returning an error if either fail. | ||
| func (inst *QemuInstance) WaitAll() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, do we actually need this new interface? Can we have it part of Wait() directly and have that return ErrInitramfsEmergency if Ignition failed? That way we automatically get this check everywhere we use and will use Wait().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funny you ask. I actually did it that way first. And then I went to go test out a FCOS build failing in the initramfs (which btw if you want to conveniently test, use e.g.
cosa run --kargs ignition.config.url=blah://) and qemu started, printed an error about the initramfs failure and then exited...so I couldn't debug it.
After that I made it a separate interface, because for that reason we don't always want to die if there's a failure in the initramfs. (Now, theoretically the caller could distinguish and explicitly call Wait() again but that's racy because there's already another goroutine doing that...)
7504c7f to
610981d
Compare
|
Rebased 🏄♂️ |
|
Cool! |
Pairs with coreos/ignition-dracut#146 This way, we error out fast if something went wrong in the initramfs rather than timing out. And further, we get the journal as JSON, so we can do something intelligent in the future to analyze it. And add a test case for this.
610981d to
b9a9e26
Compare
|
Rebased 🏄♂️ |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, jlebon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Pairs with coreos/ignition-dracut#146
What we really want is to use this in kola, will do as a
separate followup.