From de641715105a116042ad9be5e1b2d1bb2962eb9c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 10 Mar 2016 19:13:44 +0100 Subject: [PATCH] Fail when devicemapper doesn't support udev-sync Now what we provide dynamic binaries for all plaforms, we shouldn't try to run docker without udev sync support. This change changes the previous warning to an Error, unless the user explicitly overrides the warning, in which case they're at their own risk. Signed-off-by: Sebastiaan van Stijn --- daemon/graphdriver/devmapper/deviceset.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/graphdriver/devmapper/deviceset.go b/daemon/graphdriver/devmapper/deviceset.go index 7748413c13..bad1436178 100644 --- a/daemon/graphdriver/devmapper/deviceset.go +++ b/daemon/graphdriver/devmapper/deviceset.go @@ -1621,7 +1621,10 @@ func (devices *DeviceSet) initDevmapper(doInit bool) error { // https://github.com/docker/docker/issues/4036 if supported := devicemapper.UdevSetSyncSupport(true); !supported { - logrus.Warn("devmapper: Udev sync is not supported. This will lead to unexpected behavior, data loss and errors. For more information, see https://docs.docker.com/reference/commandline/daemon/#daemon-storage-driver-option") + logrus.Errorf("devmapper: Udev sync is not supported. This will lead to data loss and unexpected behavior. Install a dynamic binary to use devicemapper or select a different storage driver. For more information, see https://docs.docker.com/engine/reference/commandline/daemon/#daemon-storage-driver-option") + if !devices.overrideUdevSyncCheck { + return graphdriver.ErrNotSupported + } } //create the root dir of the devmapper driver ownership to match this