-
Notifications
You must be signed in to change notification settings - Fork 155
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
Support for Non Reportable Errors #1925
Support for Non Reportable Errors #1925
Conversation
I wanted to expand on this a bit but without cluttering up the summary. This is motivated by the fact that exceptions thrown during the autoinstall loading/validation phase necessarily means the controllers won't be fully loaded. For the restart endpoint I think this is probably fine (you should be able to restart whenever you want I suppose), but the ssh_info endpoint is a little hairy. As long as the client waits until after the I suppose one way to ensure this behavior would be to create some state variable to make the ssh_info function blocking until cloudinit has finished? |
state: ApplicationState | ||
confirming_tty: str | ||
error: Optional[ErrorReportRef] | ||
nonreportable_error: Optional[NonReportableError] | ||
cloud_init_ok: Optional[bool] | ||
interactive: Optional[bool] | ||
echo_syslog_id: str |
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.
@d-loose I am proposing to change the response object for /meta/status
to include a new field nonreportable_error
, to represent errors subiquity doesn't automatically generate apport reports for. In the case that state
is ApplicationState.ERROR
, if the error results in an apport report then error
will be populated with the reportref as before; otherwise, it will be null/none and nonreportable_error
will be filled in with a NonReportableError
. Does this seem okay from the u-d-b side of things? The one thing I'm concerned about is if there's any spots that always expect error
to be not empty when state == ApplicationState.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.
Thanks for the heads-up! I don't see any problems with this on our side. Currently any ApplicationState.ERROR
is treated as fatal to the installation process. The error
isn't being used anywhere so far.
@spydon FYI
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.
Good work!
9bcd3b5
to
09ef152
Compare
Adds a field to the ApplicationStatus struct, nonreportable_error, to be filled when the server enters an error state due to a non-reportable error/exception type.
Change when the server discovers if the install is interactive or not. This allows clients to display autoinstall errors in an interactive way, if applicable. This also enables accessing the ssh_info endpoint before all of the controllers are loaded. Autoinstall loading happens after the loading cloudinit stage, so this should be accessible by then. If a failure happens during/before cloudinit is finished, `interactive` will still be set to `None` and clients should default to the non-interactive case.
09ef152
to
2457371
Compare
Updated to address the feedback so far. The only thing left to do is figure out what to do about |
2457371
to
a7b78e2
Compare
Updated to remove the special handling of the the Now, if the install is interactive then the dialog with the error will display to the terminal. If it's not interactive, the client will inform about the error and drop into a shell session. |
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.
LGTM but please "s/interative-sessions/interactive-sections/" which was in a previous PR.
Done, thanks! |
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.
I'm happy with the changes now. Please fix the assignment of error_is_not_reportable
and I will approve.
Adds support for AutoinstallValidation errors, the first class of non-reportable errors. Includes a separate error overaly to display a warning to the user about the issue. Changes to the server to allow restarting the installer before all of the controllers are loaded, since the error means the controllers won't ever be loaded. Adds special handling to the ProgressView to change the Reboot (the machine) button to a Restart (the installer) button for this case.
128bf40
to
bae102e
Compare
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.
LGTM!
The original attempt to make a new class of non apport reportable errors in #1897 didn't quite cover everything needed, especially in regards to the changes needed in the API to inform the client of the nuance of the error state. These changes include:
ApplicationStatus
) to include a new fieldnonreportable_error
error
field, so disambiguating the error difference requires checking which oferror
andnonreportable_error
isn'tNone
/meta/restart
(POST) and/meta/ssh_info
(GET) are now available before the server has finished loading all of its controllers.interactive
state as the first step in loading the autoinstall data, not the last