nydus icon indicating copy to clipboard operation
nydus copied to clipboard

The blobs annotation in manifest should be deprecated

Open imeoer opened this issue 3 years ago • 6 comments

Reference: https://github.com/containerd/nydus-snapshotter/issues/5

imeoer avatar Jan 11 '22 02:01 imeoer

Can we have a replacement that still enables us to get the blob list statically? It is a bit heavy to run nydusd just to get the blob list. I understand that nydus-snapshotter can do it via nydusd, I'm more thinking about static analysis of nydus images.

bergwolf avatar Jan 11 '22 05:01 bergwolf

An alternative is to use the static inspect tool, for example:

$ nydus-image inspect --bootstrap ~/bootstrap -R blobs                                                                                                                     
[{"blob_id":"x","compressed_size":0,"decompressed_size":0,"readahead_offset":0,"readahead_size":0}]

imeoer avatar Jan 11 '22 06:01 imeoer

Maybe we can add another blob layer xxx, it contains blob id list and has annotation "containerd.io/snapshot/nydus-blob-ids=true". When create container, snapshot find nydus meta layer and blob_ids layer in the meantime in func findNydusMetaLayer so as to reduse find overhead. So, we can read blob id list in the right snapshot.

luodw avatar Jan 13 '22 10:01 luodw

@luodw The blob layer should exist on manifest if using the registry as blob storage backend, so the blobs annotation is mainly used on referencing the blobs stored on another storage backend (for example oss).

imeoer avatar Jan 13 '22 10:01 imeoer

@imeoer I known, I mean we can add blob ids_list layer to manifest just like meta layer. So it can also download from storage backend and unpack.

luodw avatar Jan 13 '22 10:01 luodw

@luodw Ok, I see your point, but I don't think it's necessary to have the blob list as a layer entity, if we do that, the snapshotter needs to handle it additionally, which would be a more complicated change for nydus format.

imeoer avatar Jan 14 '22 06:01 imeoer

@imeoer Shall we close this now since the label has been dropped from nydus image and related PR has been merged

changweige avatar Nov 12 '22 10:11 changweige

@changweige Ok, thanks for solving the issue.

imeoer avatar Nov 14 '22 02:11 imeoer