Merge pull request #21730 from thaJeztah/improve-udev-error
Improve udev unsupported error message
This commit is contained in:
commit
35268ee824
1 changed files with 7 additions and 1 deletions
|
@ -22,6 +22,7 @@ import (
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/docker/docker/daemon/graphdriver"
|
"github.com/docker/docker/daemon/graphdriver"
|
||||||
|
"github.com/docker/docker/dockerversion"
|
||||||
"github.com/docker/docker/pkg/devicemapper"
|
"github.com/docker/docker/pkg/devicemapper"
|
||||||
"github.com/docker/docker/pkg/idtools"
|
"github.com/docker/docker/pkg/idtools"
|
||||||
"github.com/docker/docker/pkg/loopback"
|
"github.com/docker/docker/pkg/loopback"
|
||||||
|
@ -1656,7 +1657,12 @@ func (devices *DeviceSet) initDevmapper(doInit bool) error {
|
||||||
|
|
||||||
// https://github.com/docker/docker/issues/4036
|
// https://github.com/docker/docker/issues/4036
|
||||||
if supported := devicemapper.UdevSetSyncSupport(true); !supported {
|
if supported := devicemapper.UdevSetSyncSupport(true); !supported {
|
||||||
|
if dockerversion.IAmStatic == "true" {
|
||||||
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")
|
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")
|
||||||
|
} else {
|
||||||
|
logrus.Errorf("devmapper: Udev sync is not supported. This will lead to data loss and unexpected behavior. Install a more recent version of libdevmapper 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 {
|
if !devices.overrideUdevSyncCheck {
|
||||||
return graphdriver.ErrNotSupported
|
return graphdriver.ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue