devmapper: udev sync on init
when initializing the devmapper driver, attempt to sync udev and device mapper. If udev sync is not supported, print a warning. Eventually we'll likely bail here to avoid unpredictable behavior for users. Signed-off-by: Vincent Batts <vbatts@redhat.com> Upstream-commit: 022e1232f84966c4b70a612bc35463ebb58e3137 Component: engine
This commit is contained in:
@ -947,6 +947,12 @@ func (devices *DeviceSet) initDevmapper(doInit bool) error {
|
||||
return graphdriver.ErrNotSupported
|
||||
}
|
||||
|
||||
// https://github.com/docker/docker/issues/4036
|
||||
if supported := devicemapper.UdevSetSyncSupport(true); !supported {
|
||||
log.Warnf("WARNING: Udev sync is not supported. This will lead to unexpected behavior, data loss and errors")
|
||||
}
|
||||
log.Debugf("devicemapper: udev sync support: %v", devicemapper.UdevSyncSupported())
|
||||
|
||||
if err := os.MkdirAll(devices.metadataDir(), 0700); err != nil && !os.IsExist(err) {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user