-
Notifications
You must be signed in to change notification settings - Fork 246
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
Provide a way for Ignition to report provisioning success/failure #585
Comments
Comment by @bgilbert We'll need a way to invoke the failure hook from the command line. That way, if e.g. boot fails between stages because the disks stage clobbered the boot disk, the initramfs emergency shell can invoke the hook. Since bootengine also drops to an emergency shell if Ignition itself fails, we'll need an interlock to prevent the failure hook from running twice. |
Given that we now support reporting success/failure on packet, I'm rebranding this bug to say the cmdline "oem" should support a url to POST to. Either that or we check for something like |
Capturing a bit of discussion with @arithx on this: We figured it'd also be a good idea to support posting logs to an external server/service for all the logs not just success/failure. That gets down a whole nother rabbit hole of what to support in terms of services to log to. Shouldn't be too bad to implement since we can just implement additional loggers. |
This is highly relevant for OpenShift too. We have all the pieces together to make use of this with the machine-config-operator - we'd have the MCS inject this into the Ignition it generates, pointing at itself. This would allow the MCO to make provisioning failures to admins much more obvious. |
An interesting topic here is: is this a way for Ignition to report when it fails, or is it a way for Ignition to support configuring the initramfs so that it can report any failures, even from services not technically part of Ignition? I lean a bit more towards the latter. The main thing then is how much detail to provide here - we could give a list of the failing services, or we could support dumping the entire systemd journal, or something in between. And how much do we codify these things as API versus e.g. allowing the user to inject an arbitrary systemd service into the initramfs (eww?). |
Strawman:
Semantics: If the Ignition will I'd also like to have:
Using kernel panics to signal this kind of permanent userspace failure is a useful technique in some circumstances; for example qemu has a pvpanic device that can be easily detected by the host. |
Debugging failures in the initrd is annoying; this code looks for a virtio-serial port named `com.coreos.ignition.journal`, and runs as part of `emergency.target`. I plan to change mantle to set up this port by default, so if something fails in the initramfs we'll at least reliably get the journal in a sane parsable format. This is a special targeted subset of coreos/ignition#585
Debugging failures in the initrd is annoying; this code looks for a virtio-serial port named `com.coreos.ignition.journal`, and runs as part of `emergency.target`. I plan to change mantle to set up this port by default, so if something fails in the initramfs we'll at least reliably get the journal in a sane parsable format. This is a special targeted subset of coreos/ignition#585
Debugging failures in the initrd is annoying; this code looks for a virtio-serial port named `com.coreos.ignition.journal`, and runs as part of `emergency.target`. I plan to change mantle to set up this port by default, so if something fails in the initramfs we'll at least reliably get the journal in a sane parsable format. This is a special targeted subset of coreos/ignition#585 (cherry picked from commit 84c89f4)
Random other idea:
Basically if we fail in the initramfs, we'd revert all of the changes to (A challenge with this likely generalizes into "but wait I need my networking Ignition config") Or, perhaps the simple generalization of this is:
which is like the (By analogy to systemd unit directive |
Issue by @bgilbert
Issue Report
Feature Request
Environment
Any
Desired Feature
Consider adding a way (in the Ignition config itself, or on the kernel command line) to specify a URL Ignition can POST to report success or failure.
Other Information
Use cases:
The text was updated successfully, but these errors were encountered: