From 5f81e2221075bb8fc5c8ec0e18e1a8bccb05b35f Mon Sep 17 00:00:00 2001 From: lbischof Date: Thu, 10 Jan 2019 09:32:36 +0100 Subject: [PATCH 1/2] Ignore errors if there is no docker-pool --- daemon/client/checks/docker.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/daemon/client/checks/docker.go b/daemon/client/checks/docker.go index 8576075..4fc4b24 100644 --- a/daemon/client/checks/docker.go +++ b/daemon/client/checks/docker.go @@ -13,9 +13,8 @@ func CheckDockerPool(okSize int) error { out, err := exec.Command("bash", "-c", "lvs -o data_percent,metadata_percent,LV_NAME --noheadings --units G --nosuffix | grep docker-pool").Output() if err != nil { - msg := "Could not parse docker pool size: " + err.Error() - log.Println(msg) - return errors.New(msg) + // ignore errors. grep exits with 1 if docker-pool is not found + return nil } isOk := isLvsSizeOk(string(out), okSize) From 5889d251a7d63d56f978bf463f8b8294a6450446 Mon Sep 17 00:00:00 2001 From: lbischof Date: Thu, 10 Jan 2019 09:38:46 +0100 Subject: [PATCH 2/2] Remove errors import --- daemon/client/checks/docker.go | 1 - 1 file changed, 1 deletion(-) diff --git a/daemon/client/checks/docker.go b/daemon/client/checks/docker.go index 4fc4b24..0b1d068 100644 --- a/daemon/client/checks/docker.go +++ b/daemon/client/checks/docker.go @@ -1,7 +1,6 @@ package checks import ( - "errors" "fmt" "log" "os/exec"