Переглянути джерело

Merge pull request #27419 from yongtang/10162016-warning

Fix an incorrect `WARNING` output in `docker run/create`
Lei Jitang 8 роки тому
батько
коміт
55cd8f53c9
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      daemon/daemon_unix.go

+ 1 - 1
daemon/daemon_unix.go

@@ -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)")
 		return warnings, fmt.Errorf("CPU cfs quota can not be less than 1ms (i.e. 1000)")
 	}
 	}
 	if resources.CPUPercent > 0 {
 	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)
 		logrus.Warnf("%s does not support CPU percent. Percent discarded.", runtime.GOOS)
 		resources.CPUPercent = 0
 		resources.CPUPercent = 0
 	}
 	}