mirror of https://github.com/docker/docs.git
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 <vgoyal@redhat.com>
This commit is contained in:
parent
6ba7d04d16
commit
2c8b7c597a
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue