mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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>
This commit is contained in:
parent
9c3380039e
commit
022e1232f8
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue