-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
builder: support --parent-bootstrap
for merge
#1137
builder: support --parent-bootstrap
for merge
#1137
Conversation
82e5ffc
to
d937eb9
Compare
--parent-bootstrap
for merge--parent-bootstrap
for merge
@imeoer , the title has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/55289 |
@imeoer , The CI test is completed, please check result:
Congratulations, your test job passed! |
src/bin/nydus-image/merge.rs
Outdated
} | ||
if !found { | ||
blob_idx_map.push(blob_mgr.len() as u32); | ||
if blob_idx_map.get(&blob.blob_id()).is_none() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!blob_idx_map.contains(&blob.blob_id())
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
let blobs = rs.superblock.get_blob_infos(); | ||
for blob in blobs.iter() { | ||
// Fix blob id for new images with old converters. | ||
if blob.has_feature(BlobFeatures::INLINED_FS_META) { | ||
blob.set_blob_id_from_meta_path(path.as_ref())?; | ||
fixed = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why removing this backward compatible handling?
If it's not needed any, please help to remove about comments:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to keep Fix blob id for new images with old converters.
, but remove Fix blob id for old images with old converters.
.
In fact, there is no way to check if a separate old bootstrap file was inline to the blob, for example, for an merged bootstrap generated by old converter, we can't set the blob id it references to as the filename, otherwise it will break blob table on loading rafs.
The bug can be reproduced by these steps:
$ nydus-image (v1.0.0) create --blob /blob --bootstrap /old-v5-bootstrap /source
$ nydus-image (v2.2.0) check --bootstrap /old-v5-bootstrap
RAFS filesystem metadata is valid, referenced data blobs:
0: old-v5-bootstrap, compressed data size 0x0, compressed file size 0x0, uncompressed file size 0x0, chunks: 0x0, features:
1: old-v5-bootstrap, compressed data size 0x0, compressed file size 0x0, uncompressed file size 0x0, chunks: 0x0, features:
2: old-v5-bootstrap, compressed data size 0x0, compressed file size 0x0, uncompressed file size 0x0, chunks: 0x0, features:
3: old-v5-bootstrap, compressed data size 0x0, compressed file size 0x0, uncompressed file size 0x0, chunks: 0x0, features:
Ths blob ids in output are broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need to support the snapshot view capability for old images.
This option allows merging multiple bootstraps of upper layer with the bootstrap of a parent image, so that we can implement container commit operation for nydus image. Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
In fact, there is no way to tell if a separate old bootstrap file was inline to the blob, for example, for an old merged bootstrap, we can't set the blob id it references to as the filename, otherwise it will break blob table on loading rafs. Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
d937eb9
to
a99a41f
Compare
@imeoer , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/55522 |
@imeoer , The CI test is completed, please check result:
Congratulations, your test job passed! |
This option allows merging multiple bootstraps of upper layer with
the bootstrap of a parent image, so that we can implement container
commit operation for nydus image.
Related PR: containerd/nydus-snapshotter#403