apply_kernel_params_changes

Function apply_kernel_params_changes 

Source
pub async fn apply_kernel_params_changes(
    infra: &InfraContext<'_>,
    token: &str,
    changeset: &KernelParamsChangeset,
    images_to_project: &HashMap<String, Image>,
) -> Result<(), Error>
Expand description

Write a previously prepared KernelParamsChangeset back to BSS, and patch any SBPS images supplied in images_to_project.

Access to every reboot-target xname is re-validated before the first backend write. images_to_project is normally built by build_images_to_project; pass an empty map (as the delete path does) to skip SBPS projection entirely.

BSS PUTs and IMS PATCHes are each fanned out concurrently via [futures::future::try_join_all]; the first error from either phase is propagated to the caller.

§Errors

  • [Error::BadRequest] when the caller’s access to a reboot target has been revoked since the changeset was prepared.
  • [Error::MissingField] when one of the images_to_project entries has no id.
  • [Error::NetError] / [Error::CsmError] from update_bootparameters or update_image.