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: use a umoci which has fix for another empty lgetxattr #586

Merged

Conversation

hallyn
Copy link
Contributor

@hallyn hallyn commented Jan 22, 2024

We end up with errors like:

/home/shallyn/stackertest2/roots/test2/overlay/etc/systemd/system/multi-user.target.wants: dropped overlay attrs: user.overlay.origin error: no data available
get xattr: user.overlay.origin
github.com/opencontainers/umoci/oci/layer.(*tarGenerator).AddFile
/stacker-tree/.build/gopath/pkg/mod/github.com/project-stacker/umoci@v0.0.0-20231025233220-c7bb24d57e98/oci/layer/tar_generate.go:225
github.com/opencontainers/umoci/oci/layer.GenerateInsertLayer.func1.2

Unless there is an actual data i/o error, ignore it. In particular, if the fs either says eopnotsupp, enodata, or eperm, just assume the xattr did not actually exist. We have to do this because there are cases where listxattr will return xattr keys which getxattr will filter out, and we're expected to ignore those.

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hallyn
Copy link
Contributor Author

hallyn commented Jan 22, 2024

I'm using my tree so builds can happen. Obviously we'll want to get that fix back into github.com/project-stacker/umoci

Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (47f8230) 13.02% compared to head (3f1ad55) 57.16%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #586       +/-   ##
===========================================
+ Coverage   13.02%   57.16%   +44.14%     
===========================================
  Files          40       64       +24     
  Lines        6059     7520     +1461     
===========================================
+ Hits          789     4299     +3510     
+ Misses       5138     2479     -2659     
- Partials      132      742      +610     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hallyn hallyn force-pushed the 2024-01-22/fix-more-empty-lgetxattr branch from 1477a15 to 1b334fe Compare January 23, 2024 04:02
@hallyn hallyn marked this pull request as ready for review January 23, 2024 04:03
go.sum Outdated Show resolved Hide resolved
@hallyn hallyn force-pushed the 2024-01-22/fix-more-empty-lgetxattr branch from 1b334fe to a1ce1ae Compare January 23, 2024 14:45
We end up with errors like:

/home/shallyn/stackertest2/roots/test2/overlay/etc/systemd/system/multi-user.target.wants: dropped overlay attrs: user.overlay.origin
error: no data available
get xattr: user.overlay.origin
github.com/opencontainers/umoci/oci/layer.(*tarGenerator).AddFile
        /stacker-tree/.build/gopath/pkg/mod/github.com/project-stacker/umoci@v0.0.0-20231025233220-c7bb24d57e98/oci/layer/tar_generate.go:225
github.com/opencontainers/umoci/oci/layer.GenerateInsertLayer.func1.2

Unless there is an actual data i/o error, ignore it.  In particular,
if the fs either says eopnotsupp, enodata, or eperm, just assume the
xattr did not actually exist.  We have to do this because there are
cases where listxattr will return xattr keys which getxattr will filter
out, and we're expected to ignore those.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
@hallyn hallyn force-pushed the 2024-01-22/fix-more-empty-lgetxattr branch from a1ce1ae to 3f1ad55 Compare January 23, 2024 17:12
Copy link
Contributor

@rchincha rchincha left a comment

Choose a reason for hiding this comment

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

lgtm

@rchincha rchincha merged commit 710a944 into project-stacker:main Jan 23, 2024
11 checks passed
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.

3 participants