Skip to content
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: fix rafs v5 dir size for reproducible build #642

Merged
merged 1 commit into from
Aug 6, 2022

Conversation

imeoer
Copy link
Collaborator

@imeoer imeoer commented Aug 5, 2022

Since different filesystems may calculate different directory sizes,
for RAFS v5, nydus needs to implement the directory size calculation
itself to achieve reproducible builds on different hosts or filesystems.

For RAFS v6, the directory size is calculated by actual entries.

Signed-off-by: Yan Song [email protected]

@anolis-bot
Copy link
Collaborator

@imeoer , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/17540

@anolis-bot
Copy link
Collaborator

@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/17541

@anolis-bot
Copy link
Collaborator

@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/17542

@anolis-bot
Copy link
Collaborator

@imeoer , The CI test is completed, please check result:

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

@imeoer , The CI test is completed, please check result:

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

@imeoer , The CI test is completed, please check result:

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

@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/17545

@anolis-bot
Copy link
Collaborator

@imeoer , The CI test is completed, please check result:

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

Since different filesystems may calculate different directory sizes,
for RAFS v5, nydus needs to implement the directory size calculation
itself to achieve reproducible builds on different hosts or filesystems.

For RAFS v6, the directory size is calculated by actual entries.

Signed-off-by: Yan Song <[email protected]>
@anolis-bot
Copy link
Collaborator

@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/17553

@anolis-bot
Copy link
Collaborator

@imeoer , The CI test is completed, please check result:

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus✅ SUCCESS
compile-ctr-remote✅ SUCCESS
compile-nydus-snapshotter✅ SUCCESS
start-nydus-snapshotter-config-containerd✅ SUCCESS
run-container-with-nydus-image✅ SUCCESS

Congratulations, your test job passed!

Copy link
Contributor

@eryugey eryugey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/bin/nydus-image/builder/directory.rs Outdated Show resolved Hide resolved
// for RAFS v5, nydus needs to implement the directory size calculation
// itself to achieve reproducible builds on different hosts or filesystems.
// For RAFS v6, the directory size is calculated by actual entries later.
fn set_v5_dir_size(fs_version: &RafsVersion, tree: &mut Tree) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about passing "RafsVersion" instead of "&RafsVersion"?

@jiangliu
Copy link
Collaborator

jiangliu commented Aug 6, 2022

Let's it first and I will submit a following on PR to fix the minor refinements.

@jiangliu jiangliu merged commit c68347a into dragonflyoss:master Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants