1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Do not error on relabel when relabel not supported

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff 2017-06-26 17:29:24 -04:00
parent 33fd3817b0
commit ebfdfc5768

View file

@ -156,6 +156,10 @@ func (m *MountPoint) Setup(mountLabel string, rootIDs idtools.IDPair, checkFun f
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