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

service: refine block device implementation #1332

Merged
merged 3 commits into from
Jun 21, 2023

Conversation

jiangliu
Copy link
Collaborator

Relevant Issue (if applicable)

If there are Issues related to this PullRequest, please list it.

Details

Refine block device implementation by:

  1. limit number of blocks to u32::MAX
  2. rename BlockDevice::new() to new_with_cache_manager() 3) introduce another implementation of BlockDevice::new()

Types of changes

What types of changes does your PullRequest introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@jiangliu jiangliu requested a review from a team as a code owner June 19, 2023 14:10
@jiangliu jiangliu requested review from liubogithub, imeoer and hsiangkao and removed request for a team June 19, 2023 14:10
@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/79328

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd❌ 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/79329

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Merging #1332 (6c75349) into master (1339af4) will decrease coverage by 0.01%.
The diff coverage is 17.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1332      +/-   ##
==========================================
- Coverage   45.68%   45.67%   -0.01%     
==========================================
  Files         123      123              
  Lines       37255    37258       +3     
  Branches    37255    37258       +3     
==========================================
  Hits        17019    17019              
- Misses      19337    19341       +4     
+ Partials      899      898       -1     
Impacted Files Coverage Δ
rafs/src/metadata/chunk.rs 26.39% <0.00%> (ø)
rafs/src/metadata/direct_v6.rs 6.58% <0.00%> (-0.02%) ⬇️
service/src/block_device.rs 38.60% <9.67%> (-0.08%) ⬇️
rafs/src/metadata/layout/v6.rs 55.78% <80.00%> (+0.10%) ⬆️
service/src/blob_cache.rs 78.24% <100.00%> (+0.09%) ⬆️

... and 2 files with indirect coverage changes

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ 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/79335

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ 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/79859

Refine block device implementation by:
1) limit number of blocks to u32::MAX
2) rename BlockDevice::new() to new_with_cache_manager()
3) introduce another implementation of BlockDevice::new()

Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
The rafs core assume meta data is 4k-aligned, so it fails to inspect
raw block image generated from tarfs images, which are 512-bytes
aligned.

Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
error[vulnerability]: `openssl` `X509VerifyParamRef::set_host` buffer over-read
    ┌─ /github/workspace/Cargo.lock:122:1
    │
122 │ openssl 0.10.48 registry+https://github.com/rust-lang/crates.io-index
    │ --------------------------------------------------------------------- security vulnerability detected
    │
    = ID: RUSTSEC-2023-0044
    = Advisory: https://rustsec.org/advisories/RUSTSEC-2023-0044
    = When this function was passed an empty string, `openssl` would attempt to call `strlen` on it, reading arbitrary memory until it reached a NUL byte.
    = Announcement: sfackler/rust-openssl#1965
    = Solution: Upgrade to >=0.10.55

Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
@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/79871

Copy link
Collaborator

@imeoer imeoer left a comment

Choose a reason for hiding this comment

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

LGTM

@imeoer imeoer merged commit ea32ee4 into dragonflyoss:master Jun 21, 2023
23 of 24 checks passed
@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

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

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

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.

None yet

4 participants