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

feat: notifying incosistent fs version problem with exit code #1424

Merged

Conversation

PerseidMeteor
Copy link
Contributor

@PerseidMeteor PerseidMeteor commented Sep 13, 2023

If acceld converts with different fs version cache, leading to an inconsistent fs version problem when merging into boostrap layer. So we need to notify acceld that an inconsistent version occured and handle this error.

Relevant Issue (if applicable)

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

Details

Define InconsistentFsVersion with thiserror and check error type after merge, if is fs version inconsistent problem, just return status code 2.

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.

@PerseidMeteor PerseidMeteor requested a review from a team as a code owner September 13, 2023 14:44
@PerseidMeteor PerseidMeteor requested review from luodw, gaius-qi and hsiangkao and removed request for a team September 13, 2023 14:44
@PerseidMeteor PerseidMeteor changed the title feat: notifying incosistent fs version problem with exit code [WIP]feat: notifying incosistent fs version problem with exit code Sep 13, 2023
@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Merging #1424 (a4e40a3) into master (b777564) will decrease coverage by 0.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1424      +/-   ##
==========================================
- Coverage   46.44%   46.43%   -0.01%     
==========================================
  Files         123      123              
  Lines       38702    38705       +3     
  Branches    38702    38705       +3     
==========================================
- Hits        17974    17973       -1     
- Misses      19755    19759       +4     
  Partials      973      973              
Files Changed Coverage Δ
src/bin/nydus-image/main.rs 41.58% <0.00%> (-0.20%) ⬇️
rafs/src/metadata/mod.rs 52.49% <44.00%> (+0.20%) ⬆️

... and 3 files with indirect coverage changes

@PerseidMeteor PerseidMeteor changed the title [WIP]feat: notifying incosistent fs version problem with exit code feat: notifying incosistent fs version problem with exit code Sep 20, 2023
@PerseidMeteor PerseidMeteor force-pushed the feat_inconsistent_fsversion branch 6 times, most recently from 44575e4 to ef67eb7 Compare September 20, 2023 14:31
src/bin/nydus-image/main.rs Outdated Show resolved Hide resolved
builder/src/merge.rs Outdated Show resolved Hide resolved
@PerseidMeteor PerseidMeteor force-pushed the feat_inconsistent_fsversion branch 2 times, most recently from dc8da46 to 51093ea Compare September 22, 2023 09:48
rafs/src/metadata/mod.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/main.rs Outdated Show resolved Hide resolved
@PerseidMeteor PerseidMeteor force-pushed the feat_inconsistent_fsversion branch 2 times, most recently from 31de6d7 to 0cf7469 Compare September 24, 2023 05:03
rafs/src/metadata/mod.rs Outdated Show resolved Hide resolved
rafs/src/metadata/mod.rs Outdated Show resolved Hide resolved
builder/src/merge.rs Outdated Show resolved Hide resolved
@PerseidMeteor PerseidMeteor force-pushed the feat_inconsistent_fsversion branch from 0cf7469 to 8d09de2 Compare September 25, 2023 05:30
builder/src/merge.rs Outdated Show resolved Hide resolved
src/bin/nydus-image/main.rs Outdated Show resolved Hide resolved
@PerseidMeteor PerseidMeteor force-pushed the feat_inconsistent_fsversion branch from 8d09de2 to f31ff4f Compare September 25, 2023 07:29
@PerseidMeteor PerseidMeteor force-pushed the feat_inconsistent_fsversion branch from a745c0e to 278915b Compare September 25, 2023 12:31
@PerseidMeteor PerseidMeteor reopened this Sep 25, 2023
If acceld converts with different fs version cache, leading to an inconsistent fs version problem when merging into boostrap layer. So we need to notify acceld that an inconsistent version occured and handle this error.

Signed-off-by: YuQiang <[email protected]>
@PerseidMeteor PerseidMeteor force-pushed the feat_inconsistent_fsversion branch from f0a721d to a4e40a3 Compare September 25, 2023 12:49
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! Thanks!

@imeoer imeoer merged commit aa9c95a into dragonflyoss:master Sep 25, 2023
24 checks passed
@PerseidMeteor PerseidMeteor deleted the feat_inconsistent_fsversion branch September 25, 2023 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants