Merge pull request #26205 from allencloud/fix-warnings-append

add warnings when verifying container settings
Upstream-commit: b1dfefc4bb76c48a75f07d8c478b16863266bced
Component: engine
This commit is contained in:
Brian Goff
2016-09-08 12:10:37 -04:00
committed by GitHub
+4 -1
View File
@@ -464,10 +464,13 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
}
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 {
return warnings, err
}
warnings = append(warnings, w...)
if hostConfig.ShmSize < 0 {
return warnings, fmt.Errorf("SHM size can not be less than 0")