moby/volume
Sebastiaan van Stijn 49f8a4224c
SELinux: fix ENOTSUP errors not being detected when relabeling
Commit 12c7541f1f updated the
opencontainers/selinux dependency to v1.3.1, which had a breaking
change in the errors that were returned.

Before v1.3.1, the "raw" `syscall.ENOTSUP` was returned if the
underlying filesystem did not support xattrs, but later versions
wrapped the error, which caused our detection to fail.

This patch uses `errors.Is()` to check for the underlying error.
This requires github.com/pkg/errors v0.9.1 or above (older versions
could use `errors.Cause()`, but are not compatible with "native"
wrapping of errors in Go 1.13 and up, and could potentially cause
these errors to not being detected again.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-10 17:06:44 +02:00
..
drivers Merge pull request #36688 from cpuguy83/volumes_service 2018-06-05 02:16:20 +02:00
local Really switch to moby/sys/mount* 2020-03-20 09:46:25 -07:00
mounts SELinux: fix ENOTSUP errors not being detected when relabeling 2020-05-10 17:06:44 +02:00
service Replace errors.Cause() with errors.Is() / errors.As() 2020-04-29 00:28:41 +02:00
testutils Fix flaky test TestServiceGet 2018-06-20 22:38:29 +03:00
volume.go Move mount parsing to separate package. 2018-04-19 06:35:54 -04:00