mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #41329 from zvier/master
Add more error message for ops when container limit use an device whi…
This commit is contained in:
commit
b837751e40
1 changed files with 2 additions and 2 deletions
|
@ -187,7 +187,7 @@ func getBlkioWeightDevices(config containertypes.Resources) ([]specs.LinuxWeight
|
||||||
|
|
||||||
for _, weightDevice := range config.BlkioWeightDevice {
|
for _, weightDevice := range config.BlkioWeightDevice {
|
||||||
if err := unix.Stat(weightDevice.Path, &stat); err != nil {
|
if err := unix.Stat(weightDevice.Path, &stat); err != nil {
|
||||||
return nil, err
|
return nil, errors.WithStack(&os.PathError{Op: "stat", Path: weightDevice.Path, Err: err})
|
||||||
}
|
}
|
||||||
weight := weightDevice.Weight
|
weight := weightDevice.Weight
|
||||||
d := specs.LinuxWeightDevice{Weight: &weight}
|
d := specs.LinuxWeightDevice{Weight: &weight}
|
||||||
|
@ -260,7 +260,7 @@ func getBlkioThrottleDevices(devs []*blkiodev.ThrottleDevice) ([]specs.LinuxThro
|
||||||
|
|
||||||
for _, d := range devs {
|
for _, d := range devs {
|
||||||
if err := unix.Stat(d.Path, &stat); err != nil {
|
if err := unix.Stat(d.Path, &stat); err != nil {
|
||||||
return nil, err
|
return nil, errors.WithStack(&os.PathError{Op: "stat", Path: d.Path, Err: err})
|
||||||
}
|
}
|
||||||
d := specs.LinuxThrottleDevice{Rate: d.Rate}
|
d := specs.LinuxThrottleDevice{Rate: d.Rate}
|
||||||
// the type is 32bit on mips
|
// the type is 32bit on mips
|
||||||
|
|
Loading…
Add table
Reference in a new issue