From eaec8fb7271031f5137db6d27d373bb80f6b2d83 Mon Sep 17 00:00:00 2001 From: Vivek Goyal Date: Fri, 6 Nov 2015 08:21:20 -0500 Subject: [PATCH] devmapper: Provide more error information if blkid fails Right now if blkid fails we are just logging a debug message and don;t return the actual error to caller. Caller gets the error message that thin pool base device UUID verification failed and it might give impression that thin pool changed. But that's not the case. Thin pool is in such a state that we could not even query the thin device UUID. Retrun error message appropriately to make situation more clear. Signed-off-by: Vivek Goyal Upstream-commit: 2c8b7c597ae43e28887a52a9fcb12273fe7d8797 Component: engine --- components/engine/daemon/graphdriver/devmapper/deviceset.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/engine/daemon/graphdriver/devmapper/deviceset.go b/components/engine/daemon/graphdriver/devmapper/deviceset.go index a9b1501870..5dc31bbd87 100644 --- a/components/engine/daemon/graphdriver/devmapper/deviceset.go +++ b/components/engine/daemon/graphdriver/devmapper/deviceset.go @@ -826,8 +826,7 @@ func (devices *DeviceSet) loadMetadata(hash string) *devInfo { func getDeviceUUID(device string) (string, error) { out, err := exec.Command("blkid", "-s", "UUID", "-o", "value", device).Output() if err != nil { - logrus.Debugf("Failed to find uuid for device %s:%v", device, err) - return "", err + return "", fmt.Errorf("Failed to find uuid for device %s:%v", device, err) } uuid := strings.TrimSuffix(string(out), "\n")