Browse code

Merge pull request #21097 from thaJeztah/dont-run-without-udev-sync

Fail when devicemapper doesn't support udev-sync

Brian Goff authored on 2016/03/15 10:18:01
Showing 1 changed files
... ...
@@ -1659,7 +1659,10 @@ func (devices *DeviceSet) initDevmapper(doInit bool) error {
1659 1659
 
1660 1660
 	// https://github.com/docker/docker/issues/4036
1661 1661
 	if supported := devicemapper.UdevSetSyncSupport(true); !supported {
1662
-		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")
1662
+		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")
1663
+		if !devices.overrideUdevSyncCheck {
1664
+			return graphdriver.ErrNotSupported
1665
+		}
1663 1666
 	}
1664 1667
 
1665 1668
 	//create the root dir of the devmapper driver ownership to match this