-
Notifications
You must be signed in to change notification settings - Fork 15
DNM engineering: Add --runtime flag
#385
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
base: main
Are you sure you want to change the base?
Changes from all commits
ab8e75c
d95b7a3
701d53e
5777a91
bdf5656
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ pub(crate) fn update( | |
| host_config: &HostConfiguration, | ||
| state: &mut DataStore, | ||
| allowed_operations: &Operations, | ||
| expect_runtime: bool, | ||
| image: OsImage, | ||
| #[cfg(feature = "grpc-dangerous")] sender: &mut Option<GrpcSender>, | ||
| ) -> Result<ExitKind, TridentError> { | ||
|
|
@@ -80,6 +81,11 @@ pub(crate) fn update( | |
| } | ||
| ServicingType::RuntimeUpdate => {} | ||
| ServicingType::AbUpdate => { | ||
| if expect_runtime { | ||
| return Err(TridentError::new( | ||
| InvalidInputError::AbUpdateRuntimeFlagMismatch, | ||
| )); | ||
| } | ||
ayaegashi marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+84
to
+88
|
||
| // Execute pre-servicing scripts | ||
| HooksSubsystem::new_for_local_scripts().execute_pre_servicing_scripts(&ctx)?; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -155,6 +155,10 @@ Options: | |||||
| -v, --verbosity <VERBOSITY> | ||||||
| Logging verbosity [OFF, ERROR, WARN, INFO, DEBUG, TRACE] | ||||||
| [default: DEBUG] | ||||||
| --runtime | ||||||
| Boolean indicating that a runtime update is expected. If | ||||||
| Trident determines that an A/B update is required, it will | ||||||
| issue a fatal error to avoid an unexpected reboot | ||||||
| -s, --status <STATUS> | ||||||
| Path to save the resulting Host Status | ||||||
| -e, --error <ERROR> | ||||||
|
|
@@ -183,6 +187,11 @@ Possible values: | |||||
| Default: `stage,finalize` | ||||||
|
|
||||||
|
|
||||||
| #### <span>--runtime <RUNTIME></span> | ||||||
ayaegashi marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| #### <span>--runtime <RUNTIME></span> | |
| #### <span>--runtime</span> |
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.
The parameter name
expect_runtimeis inconsistent with the CLI flag nameruntimeused elsewhere in the codebase. For clarity and consistency, consider renaming this parameter toruntimeto match the CLI flag name used incli.rs,main.rs, andlib.rs.