Merge pull request #27419 from yongtang/10162016-warning

Fix an incorrect `WARNING` output in `docker run/create`
This commit is contained in:
Lei Jitang 2016-10-17 18:37:03 +08:00 committed by GitHub
commit 55cd8f53c9

View file

@ -351,7 +351,7 @@ func verifyContainerResources(resources *containertypes.Resources, sysInfo *sysi
return warnings, fmt.Errorf("CPU cfs quota can not be less than 1ms (i.e. 1000)")
}
if resources.CPUPercent > 0 {
warnings = append(warnings, "%s does not support CPU percent. Percent discarded.", runtime.GOOS)
warnings = append(warnings, fmt.Sprintf("%s does not support CPU percent. Percent discarded.", runtime.GOOS))
logrus.Warnf("%s does not support CPU percent. Percent discarded.", runtime.GOOS)
resources.CPUPercent = 0
}