Ignore xattr errors on copy (fixes #38155)#38316
Ignore xattr errors on copy (fixes #38155)#38316vdemeester merged 1 commit intomoby:masterfrom dmandalidis:xattr-fix
Conversation
|
|
cpuguy83
left a comment
There was a problem hiding this comment.
Thanks!
Just a question on how we are handling the errors. Right now it will ignore all errors but I think to fix the bug we may only want to ignore on "not supported" and possibly permissions errors... but there may be other cases I am unaware of.
container/container_unix.go
Outdated
There was a problem hiding this comment.
I think we should make our own handler here and explicitly check for ENOTSUP or possibly EPERM.
WDYT? @AkihiroSuda ?
There was a problem hiding this comment.
@cpuguy83 imo the best approach would be to check-before-set, especially for ENOTSUP. In that way we could horizontally control whether we fail for unsupported operations or not. However, I 've sent a change reflecting your comment to have an example to discuss. Intuitively, it doesn't look very nice as I think we 're going too deep, but I 've no other arguments against this since syscall errno is also examined elsewhere.
Codecov Report
@@ Coverage Diff @@
## master #38316 +/- ##
=========================================
Coverage ? 36.56%
=========================================
Files ? 610
Lines ? 45281
Branches ? 0
=========================================
Hits ? 16555
Misses ? 26399
Partials ? 2327 |
container/container_unix.go
Outdated
Signed-off-by: Dimitris Mandalidis <dimitris.mandalidis@gmail.com>
Signed-off-by: Dimitris Mandalidis dimitris.mandalidis@gmail.com
- What I did
Allowed copy an existing folder, ignoring xattr set errors when the target filesystem doesn't support xattr.
- How I did it
Updated containerd/continuity to take advantage of newly-introduced
CopyDirOpt. Passedfs.WithAllowXAttrErrorsatfs.CopyDirofcontainer_unix.go#copyExistingContentsto ignore xattr set errors- How to verify it
- Description for the changelog
Ignore extended attributes set errors during copy.
Fixes #38155