project-stacker / stacker

Build OCI images natively from a declarative format
https://stackerbuild.io
Apache License 2.0
208 stars 34 forks source link

fix: use a umoci which has fix for another empty lgetxattr #586

Closed hallyn closed 10 months ago

hallyn commented 10 months ago

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 commented 10 months ago

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

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.