1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #23974 from hopkings2008/devmapper_log

Add detail error logs when 'Unknown Device' error happens if devicema…
This commit is contained in:
Lei Jitang 2016-06-29 23:39:40 -07:00 committed by GitHub
commit d2da1e3997

View file

@ -901,10 +901,12 @@ func (devices *DeviceSet) loadMetadata(hash string) *devInfo {
jsonData, err := ioutil.ReadFile(devices.metadataFile(info))
if err != nil {
logrus.Debugf("devmapper: Failed to read %s with err: %v", devices.metadataFile(info), err)
return nil
}
if err := json.Unmarshal(jsonData, &info); err != nil {
logrus.Debugf("devmapper: Failed to unmarshal devInfo from %s with err: %v", devices.metadataFile(info), err)
return nil
}