(
image_ref: &str,
rootfs: &Path,
layer: &DownloadedRegistryLayer,
)
| 3689 | } |
| 3690 | |
| 3691 | async fn apply_registry_layer_blob( |
| 3692 | image_ref: &str, |
| 3693 | rootfs: &Path, |
| 3694 | layer: &DownloadedRegistryLayer, |
| 3695 | ) -> Result<(), Status> { |
| 3696 | let layer_root_for_unpack = layer.layer_root.clone(); |
| 3697 | let rootfs_for_unpack = rootfs.to_path_buf(); |
| 3698 | tokio::task::spawn_blocking(move || { |
| 3699 | apply_layer_dir_to_rootfs(&layer_root_for_unpack, &rootfs_for_unpack) |
| 3700 | }) |
| 3701 | .await |
| 3702 | .map_err(|err| Status::internal(format!("layer application panicked: {err}")))? |
| 3703 | .map_err(|err| { |
| 3704 | Status::failed_precondition(format!( |
| 3705 | "failed to apply layer '{}' for vm sandbox image '{image_ref}': {err}", |
| 3706 | layer.digest |
| 3707 | )) |
| 3708 | }) |
| 3709 | } |
| 3710 | |
| 3711 | async fn download_registry_descriptor_blob_file( |
| 3712 | client: &OciClient, |
no test coverage detected