moby--moby/container
Sebastiaan van Stijn 57f6c9a0ef
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>
(cherry picked from commit 49f8a4224c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-10 17:08:42 +02:00
..
stream Handle blocked I/O of exec'd processes 2019-09-20 19:10:52 +02:00
archive.go container.BaseFS: check for nil before deref 2018-03-13 21:24:48 -07:00
container.go Handle blocked I/O of exec'd processes 2019-09-20 19:10:52 +02:00
container_unit_test.go Update tests to use gotest.tools 👼 2018-06-13 09:04:30 +02:00
container_unix.go SELinux: fix ENOTSUP errors not being detected when relabeling 2020-05-10 17:08:42 +02:00
container_windows.go Remove DiskQouta field. 2019-05-13 15:42:41 -07:00
env.go Add canonical import comment 2018-02-05 16:51:57 -05:00
env_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
health.go Avoid a data race in container/health.go 2020-01-17 10:12:32 +01:00
history.go Add canonical import comment 2018-02-05 16:51:57 -05:00
memory_store.go Add canonical import comment 2018-02-05 16:51:57 -05:00
memory_store_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
monitor.go Add canonical import comment 2018-02-05 16:51:57 -05:00
mounts_unix.go mount: add BindOptions.NonRecursive (API v1.40) 2018-11-06 17:51:58 +09:00
mounts_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
state.go Fix phrasing when referring to the freezer cgroup 2020-01-17 11:21:48 +01:00
state_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
store.go Add canonical import comment 2018-02-05 16:51:57 -05:00
view.go fix code typo 2019-01-11 15:14:17 +08:00
view_test.go Switch to google/uuid 2019-03-13 14:13:58 +00:00