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

fix: handle overlay xattr opaque bit #538

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rchincha
Copy link
Contributor

Current behavior determines if a path is a whiteout if a overlay char dev is present.

Additionally, also check the extended attrs.

@codecov-commenter
Copy link

codecov-commenter commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 38.88889% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 73.28%. Comparing base (0a7d3ec) to head (3db0591).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #538      +/-   ##
==========================================
- Coverage   73.34%   73.28%   -0.06%     
==========================================
  Files          60       60              
  Lines        4895     4908      +13     
==========================================
+ Hits         3590     3597       +7     
- Misses        944      949       +5     
- Partials      361      362       +1     
Files Coverage Δ
oci/layer/generate.go 64.48% <50.00%> (ø)
oci/layer/utils.go 65.18% <37.50%> (-4.49%) ⬇️

... and 1 file with indirect coverage changes

@hallyn
Copy link
Contributor

hallyn commented Mar 29, 2024

Looks like some delta between current main branch and the project-stacker branch, @rchincha .

@rchincha rchincha force-pushed the overlay-opaque branch 5 times, most recently from 60783be to e7a8957 Compare March 29, 2024 20:50
Current behavior determines if a path is a whiteout if a overlay char
dev is present.

Additionally, also check the extended attrs.

For files, this is not important: if a file /foo/bar exists in
some two layers, then the higher layer's version will replace
the lower layer's version whether or not the opaque bit is set.

However, directories behave differently.  If /foo exists in two
layers and no opaque bit is set, then we see the union of their
contents.  But if the opaque bit is set on the higher layer's
version, then we should not see the lower layer's version.

So, in that case, create a whiteout /.wh_foo.

Signed-off-by: Ramkumar Chinchani <[email protected]>
@tych0
Copy link
Member

tych0 commented Apr 1, 2024

This behavior seems a bit fiddly; can you add a test to make sure it doesn't break in the future? I think that will also help describe what the problem is.

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.

None yet

4 participants