Merge pull request #17757 from rhvgoyal/log-blkid-failure

devmapper: Provide more error information if blkid fails
Upstream-commit: 10df5647bd5c9e5946412bd58fefb5323f67bc49
Component: engine
This commit is contained in:
Vincent Batts
2015-11-07 09:16:14 -05:00

View File

@ -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")