Do not error on relabel when relabel not supported

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit ebfdfc5768b74e0a52875cf76a0576bfcd66445c)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
This commit is contained in:
Brian Goff
2017-07-12 01:16:00 +00:00
committed by Andrew Hsu
parent 38f7bacec2
commit b0efd8dda5
+4
View File
@@ -153,6 +153,10 @@ func (m *MountPoint) Setup(mountLabel string, rootUID, rootGID int, checkFun fun
if err == nil {
if label.RelabelNeeded(m.Mode) {
if err = label.Relabel(m.Source, mountLabel, label.IsShared(m.Mode)); err != nil {
if err == syscall.ENOTSUP {
err = nil
return
}
path = ""
err = errors.Wrapf(err, "error setting label on mount source '%s'", m.Source)
return