nydus icon indicating copy to clipboard operation
nydus copied to clipboard

nydus-image: fix rafs v6 to get file's parent inode

Open sctb512 opened this issue 3 years ago • 6 comments

Currently, the parent of file is None, we can set the parent inode by traversing root directory. This PR is addressing #768

Signed-off-by: Bin Tang [email protected]

sctb512 avatar Oct 10 '22 08:10 sctb512

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

anolis-bot avatar Oct 10 '22 08:10 anolis-bot

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

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

Congratulations, your test job passed!

anolis-bot avatar Oct 10 '22 08:10 anolis-bot

rafs v5 can have i_parent for every inode because it duplicates hardlink inodes and each would have different i_parent. For rafs v6, this is unsupported by design. If we still want to have such functionality, we need to be aware that for rafs v6 hardlinks, it is unreliable to find inode's parent by traversing from the root inode, and specially deal with it in nydus-image inspect.

bergwolf avatar Oct 11 '22 06:10 bergwolf

nydus-image inspect

Ok, maybe deal with it in nydus-image inspect is better.

sctb512 avatar Oct 11 '22 08:10 sctb512

nydus-image inspect

Ok, maybe deal with it in nydus-image inspect is better.

The fundamental issue is that v6 doesn't support "get_parent", so nydus-image inspect could only do best effort to find a parent. And the runtime can't guarenttee get_parent()

jiangliu avatar Oct 12 '22 04:10 jiangliu

nydus-image inspect

Ok, maybe deal with it in nydus-image inspect is better.

The fundamental issue is that v6 doesn't support "get_parent", so nydus-image inspect could only do best effort to find a parent. And the runtime can't guarenttee get_parent()

I got it. It means try to find parent only in nydus-image inspect, right? For hardlink, if needed, we can traverse it completely to find all parent?

sctb512 avatar Oct 12 '22 07:10 sctb512

@sctb512 , 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/26634

anolis-bot avatar Oct 14 '22 03:10 anolis-bot

@sctb512 , 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/26635

anolis-bot avatar Oct 14 '22 03:10 anolis-bot

@sctb512 , 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/26636

anolis-bot avatar Oct 14 '22 03:10 anolis-bot

@sctb512 , 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/26637

anolis-bot avatar Oct 14 '22 04:10 anolis-bot

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

Test CaseTest Result
merge-target-branch:x: FAIL

Sorry, your test job failed. Please get the details in the link.

anolis-bot avatar Oct 14 '22 04:10 anolis-bot

@sctb512 , the title of this PR starts with "WIP" or "[WIP]", so skip testing for now.

anolis-bot avatar Oct 14 '22 04:10 anolis-bot

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

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

Congratulations, your test job passed!

anolis-bot avatar Oct 14 '22 04:10 anolis-bot

@sctb512 , the title of this PR starts with "WIP" or "[WIP]", so skip testing for now.

anolis-bot avatar Oct 14 '22 04:10 anolis-bot

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

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

Congratulations, your test job passed!

anolis-bot avatar Oct 14 '22 04:10 anolis-bot

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

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

Congratulations, your test job passed!

anolis-bot avatar Oct 14 '22 04:10 anolis-bot

@sctb512 , the title of this PR starts with "WIP" or "[WIP]", so skip testing for now.

anolis-bot avatar Oct 14 '22 04:10 anolis-bot

@sctb512 , the title of this PR starts with "WIP" or "[WIP]", so skip testing for now.

anolis-bot avatar Oct 14 '22 06:10 anolis-bot

@sctb512 , the title of this PR starts with "WIP" or "[WIP]", so skip testing for now.

anolis-bot avatar Oct 14 '22 07:10 anolis-bot

@sctb512 , the title of this PR starts with "WIP" or "[WIP]", so skip testing for now.

anolis-bot avatar Oct 14 '22 07:10 anolis-bot

@sctb512 , 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/26681

anolis-bot avatar Oct 14 '22 07:10 anolis-bot

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

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

Congratulations, your test job passed!

anolis-bot avatar Oct 14 '22 07:10 anolis-bot

@sctb512 , 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/26915

anolis-bot avatar Oct 17 '22 02:10 anolis-bot

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

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

Congratulations, your test job passed!

anolis-bot avatar Oct 17 '22 02:10 anolis-bot