mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #26205 from allencloud/fix-warnings-append
add warnings when verifying container settings
This commit is contained in:
commit
b1dfefc4bb
1 changed files with 4 additions and 1 deletions
|
@ -464,10 +464,13 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
|
||||||
}
|
}
|
||||||
|
|
||||||
w, err := verifyContainerResources(&hostConfig.Resources, sysInfo, update)
|
w, err := verifyContainerResources(&hostConfig.Resources, sysInfo, update)
|
||||||
|
|
||||||
|
// no matter err is nil or not, w could have data in itself.
|
||||||
|
warnings = append(warnings, w...)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return warnings, err
|
return warnings, err
|
||||||
}
|
}
|
||||||
warnings = append(warnings, w...)
|
|
||||||
|
|
||||||
if hostConfig.ShmSize < 0 {
|
if hostConfig.ShmSize < 0 {
|
||||||
return warnings, fmt.Errorf("SHM size can not be less than 0")
|
return warnings, fmt.Errorf("SHM size can not be less than 0")
|
||||||
|
|
Loading…
Add table
Reference in a new issue