MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / apply_registry_layer_blob

Function apply_registry_layer_blob

crates/openshell-driver-vm/src/driver.rs:3691–3709  ·  view source on GitHub ↗
(
    image_ref: &str,
    rootfs: &Path,
    layer: &DownloadedRegistryLayer,
)

Source from the content-addressed store, hash-verified

3689}
3690
3691async 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
3711async fn download_registry_descriptor_blob_file(
3712 client: &OciClient,

Callers 1

Calls 1

Tested by

no test coverage detected