mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue