Merge pull request #19890 from vishh/0-nodes

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2016-02-01 14:09:06 -08:00
2 changed files with 3 additions and 5 deletions

View File

@@ -273,8 +273,8 @@ func CheckPodsExceedingFreeResources(pods []*api.Pod, allocatable api.ResourceLi
memoryRequested := int64(0)
for _, pod := range pods {
podRequest := getResourceRequest(pod)
fitsCPU := totalMilliCPU == 0 || (totalMilliCPU-milliCPURequested) >= podRequest.milliCPU
fitsMemory := totalMemory == 0 || (totalMemory-memoryRequested) >= podRequest.memory
fitsCPU := (totalMilliCPU - milliCPURequested) >= podRequest.milliCPU
fitsMemory := (totalMemory - memoryRequested) >= podRequest.memory
if !fitsCPU {
// the pod doesn't fit due to CPU request
notFittingCPU = append(notFittingCPU, pod)