Merge pull request #1588 from derekwaynecarr/disable_thin_ls
disable thin_ls due to excessive iops
This commit is contained in:
commit
f1af5b407c
@ -57,6 +57,12 @@ var (
|
|||||||
dockerRootDirFlag = flag.String("docker_root", "/var/lib/docker", "DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)")
|
dockerRootDirFlag = flag.String("docker_root", "/var/lib/docker", "DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)")
|
||||||
|
|
||||||
dockerRootDirOnce sync.Once
|
dockerRootDirOnce sync.Once
|
||||||
|
|
||||||
|
// flag that controls globally disabling thin_ls pending future enhancements.
|
||||||
|
// in production, it has been found that thin_ls makes excessive use of iops.
|
||||||
|
// in an iops restricted environment, usage of thin_ls must be controlled via blkio.
|
||||||
|
// pending that enhancement, disable its usage.
|
||||||
|
disableThinLs = true
|
||||||
)
|
)
|
||||||
|
|
||||||
func RootDir() string {
|
func RootDir() string {
|
||||||
@ -189,6 +195,10 @@ func startThinPoolWatcher(dockerInfo *dockertypes.Info) (*devicemapper.ThinPoolW
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if disableThinLs {
|
||||||
|
return nil, fmt.Errorf("usage of thin_ls is disabled to preserve iops")
|
||||||
|
}
|
||||||
|
|
||||||
dockerThinPoolName, err := dockerutil.DockerThinPoolName(*dockerInfo)
|
dockerThinPoolName, err := dockerutil.DockerThinPoolName(*dockerInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user