mirror of https://github.com/docker/docs.git
Merge pull request #17757 from rhvgoyal/log-blkid-failure
devmapper: Provide more error information if blkid fails
This commit is contained in:
commit
10df5647bd
|
@ -826,8 +826,7 @@ func (devices *DeviceSet) loadMetadata(hash string) *devInfo {
|
||||||
func getDeviceUUID(device string) (string, error) {
|
func getDeviceUUID(device string) (string, error) {
|
||||||
out, err := exec.Command("blkid", "-s", "UUID", "-o", "value", device).Output()
|
out, err := exec.Command("blkid", "-s", "UUID", "-o", "value", device).Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Debugf("Failed to find uuid for device %s:%v", device, err)
|
return "", fmt.Errorf("Failed to find uuid for device %s:%v", device, err)
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uuid := strings.TrimSuffix(string(out), "\n")
|
uuid := strings.TrimSuffix(string(out), "\n")
|
||||||
|
|
Loading…
Reference in New Issue