Explorar o código

Merge pull request #27419 from yongtang/10162016-warning

Fix an incorrect `WARNING` output in `docker run/create`
Lei Jitang %!s(int64=8) %!d(string=hai) anos
pai
achega
55cd8f53c9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)")
 	}
 	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
 	}