From da643c0b8a4f287596289fe4d81d6a032565ac47 Mon Sep 17 00:00:00 2001 From: huang-jl <1046678590@qq.com> Date: Tue, 27 Feb 2024 20:17:31 +0800 Subject: [PATCH] libcontainerd: change the digest used when restoring For current implementation of Checkpoint Restore (C/R) in docker, it will write the checkpoint to content store. However, when restoring libcontainerd uses .Digest().Encoded(), which will remove the info of alg, leading to error. Signed-off-by: huang-jl <1046678590@qq.com> --- libcontainerd/remote/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainerd/remote/client.go b/libcontainerd/remote/client.go index 670c2d089dfd9..ee0ddd17d814a 100644 --- a/libcontainerd/remote/client.go +++ b/libcontainerd/remote/client.go @@ -723,7 +723,7 @@ func (c *client) writeContent(ctx context.Context, mediaType, ref string, r io.R } return &types.Descriptor{ MediaType: mediaType, - Digest: writer.Digest().Encoded(), + Digest: writer.Digest().String(), Size: size, }, nil }