Commit 27512dd0 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #25190 from ingvagabund/e2e-scheduler-predicates-validate-resource-limits

Automatic merge from submit-queue SchedulerPredicates e2e test: be more verbose about requested resource When ``validates resource limits of pods that are allowed to run [Conformance]`` test is run, logs could give more information about requested resource and say it is for cpu and in mili units. cpu is stored in m units here: ``` nodeToCapacityMap[node.Name] = capacity.MilliValue() ```
parents 3b0a6dac 6bfc8016
......@@ -289,7 +289,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() {
for _, pod := range pods.Items {
_, found := nodeToCapacityMap[pod.Spec.NodeName]
if found && pod.Status.Phase == api.PodRunning {
framework.Logf("Pod %v requesting resource %v on Node %v", pod.Name, getRequestedCPU(pod), pod.Spec.NodeName)
framework.Logf("Pod %v requesting resource cpu=%vm on Node %v", pod.Name, getRequestedCPU(pod), pod.Spec.NodeName)
nodeToCapacityMap[pod.Spec.NodeName] -= getRequestedCPU(pod)
}
}
......@@ -297,7 +297,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() {
var podsNeededForSaturation int
milliCpuPerPod := int64(500)
for name, leftCapacity := range nodeToCapacityMap {
framework.Logf("Node: %v has capacity: %v", name, leftCapacity)
framework.Logf("Node: %v has cpu capacity: %vm", name, leftCapacity)
podsNeededForSaturation += (int)(leftCapacity / milliCpuPerPod)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment