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

Change default value of nydus-image and optimize output #798

Merged
merged 8 commits into from
Nov 6, 2022

Conversation

jiangliu
Copy link
Collaborator

Change default configuration for nydus-image create by

  1. change default compressor from lz4_block to zstd
  2. change default hash algorithm from blake3 to sha256
  3. change default fs-version from 5 to 6
  4. limit aligned-chunk to RAFS v5

Also tune output of nydus-image create and now it becomes readable:

root@5ad838c8bf7b:/nydus# target/debug/nydus-image create -t directory -D images/ -J output.json src/
[2022-10-17 16:04:52.787992 +00:00] INFO rafs superblock features: HASH_SHA256 | EXPLICIT_UID_GID | COMPRESSION_ZSTD
[2022-10-17 16:04:52.824325 +00:00] INFO successfully build RAFS filesystem: 
meta blob path: images/6fb4d603307df0e8c523a14825181cc0c9c3de4c2797b5e341c7c489b40ab13c
data blob size: 0x22de7
data blobs: ["c508580ee90cbd543713067cb22c28b7bf444c457de5e4a53b797e5575307b7a"]
root@5ad838c8bf7b:/nydus# cat output.json 
{
  "version": "v2.1.0-rc.3.1-162-g231296a4a-231296a4ad78fa0ec1f68fa565935c9ef58a32e1",
  "bootstrap": "images/6fb4d603307df0e8c523a14825181cc0c9c3de4c2797b5e341c7c489b40ab13c",
  "blobs": [
    "c508580ee90cbd543713067cb22c28b7bf444c457de5e4a53b797e5575307b7a"
  ],
  "trace": {
    "consumed_time": {
      "build_bootstrap": 0.006259500049054623,
      "dump_blob": 0.11847899854183197,
      "dump_bootstrap": 0.07097754627466202,
      "load_from_directory": 0.005598959047347307,
      "load_tree_from_bootstrap": 0.01346754189580679,
      "total_build": 0.2859921157360077,
      "validate_bootstrap": 0.024069499224424362
    },
    "registered_events": {
      "blob_compressed_size": 142823,
      "blob_uncompressed_size": 528544,
      "egid": "0",
      "euid": "0",
      "load_from_directory": 44,
      "load_from_parent_bootstrap": 44
    }
  }
}

@anolis-bot
Copy link
Collaborator

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

@jiangliu jiangliu force-pushed the nydus-image-default branch 2 times, most recently from 7be22e2 to 3e1b83a Compare October 17, 2022 16:24
@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus❌ FAIL

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

@anolis-bot
Copy link
Collaborator

@jiangliu , 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/27222

@jiangliu jiangliu force-pushed the nydus-image-default branch from 3e1b83a to ab671c4 Compare October 17, 2022 16:32
@anolis-bot
Copy link
Collaborator

@jiangliu , 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/27223

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
nydus_ci❌ FAIL

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

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus❌ FAIL

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

@anolis-bot
Copy link
Collaborator

@jiangliu , 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/27246

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
merge-target-branch✅ SUCCESS
build-docker-image✅ SUCCESS
compile-nydus❌ FAIL

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

@anolis-bot
Copy link
Collaborator

@jiangliu , 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/27277

@jiangliu jiangliu force-pushed the nydus-image-default branch from 6b484de to 1f3458c Compare October 18, 2022 03:07
@anolis-bot
Copy link
Collaborator

@jiangliu , 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/27287

@anolis-bot
Copy link
Collaborator

@jiangliu , 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

@jiangliu , 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/31110

@anolis-bot
Copy link
Collaborator

@jiangliu , 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!

Simplify check and inspect subcommand by directly taking a BOOTSTRAP
parameter instead of --bootstrap BOOTSTRAP.

Signed-off-by: Jiang Liu <[email protected]>
Change build output from
[2022-10-17 10:28:32.724440 +00:00] INFO [src/bin/nydus-image/main.rs:745] build successfully: BuildOutput { blobs: ["f13359310bee12d3f3a61e15be862bbcf16ecd1615d8e1a62e64ac80b56dd561"], blob_size: Some(2854077), bootstrap_path: Some("images/dc9ee42be5cb0645f69a3592cc7aaece02cef12675460b3c3b5240b3ec62866a") }

to
root@5ad838c8bf7b:/nydus# target/debug/nydus-image create -t directory -D images/  src/
[2022-10-17 15:32:58.542898 +00:00] INFO [rafs/src/metadata/md_v6.rs:49] rafs superblock features: HASH_SHA256 | EXPLICIT_UID_GID | COMPRESSION_ZSTD
[2022-10-17 15:32:58.545912 +00:00] INFO [src/bin/nydus-image/main.rs:718] successfully build RAFS filesystem:
meta blob path: images/b4e34ad5aeecd4f2e6c047fdd52db9ac8f53981251adb0ac8048db48e45cac1a
data blob size: 0x22dde
data blobs: ["58b6693aa54de2515d2092dab0e66978b20b6382d08e52c06f14498e770df739"]

Signed-off-by: Jiang Liu <[email protected]>
Add bootstrap path to build output.

Signed-off-by: Jiang Liu <[email protected]>
Remove deprecated options of create subcommand:
--backend-config
--backend-type

Signed-off-by: Jiang Liu <[email protected]>
Refine log messages:
1) remove file:line from INFO
2) strip prefix of file

Now the output becomes:
root@5ad838c8bf7b:/nydus# target/debug/nydus-image create -t directory -D images/  src/
[2022-10-17 15:54:35.102076 +00:00] INFO rafs superblock features: HASH_SHA256 | EXPLICIT_UID_GID | COMPRESSION_ZSTD
[2022-10-17 15:54:35.139154 +00:00] INFO successfully build RAFS filesystem:
meta blob path: images/6fb4d603307df0e8c523a14825181cc0c9c3de4c2797b5e341c7c489b40ab13c
data blob size: 0x22de7
data blobs: ["c508580ee90cbd543713067cb22c28b7bf444c457de5e4a53b797e5575307b7a"]

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

@jiangliu , 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!

@jiangliu jiangliu merged commit 9e49996 into dragonflyoss:master Nov 6, 2022
@jiangliu jiangliu force-pushed the nydus-image-default branch from 3eb8303 to 74ea474 Compare November 6, 2022 09:34
@anolis-bot
Copy link
Collaborator

@jiangliu , 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/31127

@anolis-bot
Copy link
Collaborator

@jiangliu , 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

@jiangliu , 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/31129

@jiangliu jiangliu deleted the nydus-image-default branch November 8, 2022 06:18
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