-
Notifications
You must be signed in to change notification settings - Fork 98
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
Ignore error when xattr data is not available #457
base: main
Are you sure you want to change the base?
Conversation
Is this CI failure related to this PR?
|
oci/layer/tar_generate.go
Outdated
|
||
// in case of overlayfs, we may not get the xattr data itself, | ||
// so ignore if this particular error code | ||
if err == syscall.ENODATA { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if errors.Is(err, unix.ENODATA)
would be better.
No, it's because we haven't bumped the Go version for linting recently. I'll fix it now. |
@rchincha Can you rebase this? CI has been fixed. |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #457 +/- ##
==========================================
- Coverage 73.45% 73.40% -0.05%
==========================================
Files 60 57 -3
Lines 4886 4885 -1
==========================================
- Hits 3589 3586 -3
Misses 937 937
- Partials 360 362 +2
|
Goals of this PR: 1. Allow passing in options to individual compressor 2. Do not change default behavior Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Signed-off-by: Serge Hallyn <serge@hallyn.com>
…ix-empty-lgetxattr 2024 01 22/backport fix empty lgetxattr
generatelayer closes the tarwriter, but generateinsertlayer forgets to. Closing the tarwriter writes the required footer of 1k of zeros. This results in tar files that are complete but invalid, and different reading tools will behave differently: - bsdtar doesn't complain and exits 0 - gnu tar (and security scanning tools that use it) will exit 2 with an unexpected EOF message - python's tarfile library will raise an Unexpected EOF error - golang's archive/tar library can raise an unexpected EOF error, but for some files created by generateinsertlayer, it just raises a plain EOF error, which means golang based tools generally ignore this and work fine, this includes umoci. Signed-off-by: Michael McCracken <mikmccra@cisco.com> (cherry picked from commit ad29ed3)
This warning is a little confusing when err is nil, and doesn't add any info in that case. Let's clean that up. Signed-off-by: Michael McCracken <mikmccra@cisco.com> (cherry picked from commit 653952b)
add a check to image-verify to ensure that all generated tar blobs are valid and do not cause gnu tar to exit nonzero add an insert test that adds a very small file to trigger unexpected EOF in the case where GenerateInsertLayer forgets to close the TarWriter. Signed-off-by: Michael McCracken <mikmccra@cisco.com> (cherry picked from commit 7bb2940)
…ckerfork-main/close-tarwriter 2024.02.22/stackerfork main/close tarwriter
add tarwriter fixes from upstream
fc29e2e
to
e224054
Compare
Can you rebase with only the commits for this branch and drop all the merge noise? |
24d357b
to
3c7bd3c
Compare
8c0bc21
to
d67d94b
Compare
Current behavior determines if a path is a whiteout if a overlay char dev is present. Additionally, also check the extended attrs. Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
fix: handle overlay xattr opaque bit
CI failures indicate that this could be another error code that needs to be handled. Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
When the underlying filesystem is overlayfs, it is possible that xattrs are present but without the data. So check for this case specifically and ignore it.
Signed-off-by: Ramkumar Chinchani rchincha@cisco.com