@@ -27,7 +27,6 @@ import (
27
27
kubeletstatsv1alpha1 "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1"
28
28
"k8s.io/kubernetes/test/e2e/framework"
29
29
e2ekubelet "k8s.io/kubernetes/test/e2e/framework/kubelet"
30
- e2elog "k8s.io/kubernetes/test/e2e/framework/log"
31
30
e2emetrics "k8s.io/kubernetes/test/e2e/framework/metrics"
32
31
e2eperf "k8s.io/kubernetes/test/e2e/framework/perf"
33
32
"k8s.io/kubernetes/test/e2e/perftype"
@@ -58,10 +57,10 @@ func logPodsOnNodes(c clientset.Interface, nodeNames []string) {
58
57
for _ , n := range nodeNames {
59
58
podList , err := e2ekubelet .GetKubeletRunningPods (c , n )
60
59
if err != nil {
61
- e2elog .Logf ("Unable to retrieve kubelet pods for node %v" , n )
60
+ framework .Logf ("Unable to retrieve kubelet pods for node %v" , n )
62
61
continue
63
62
}
64
- e2elog .Logf ("%d pods are running on node %v" , len (podList .Items ), n )
63
+ framework .Logf ("%d pods are running on node %v" , len (podList .Items ), n )
65
64
}
66
65
}
67
66
@@ -95,7 +94,7 @@ func runResourceTrackingTest(f *framework.Framework, podsPerNode int, nodeNames
95
94
deadline := time .Now ().Add (monitoringTime )
96
95
for time .Now ().Before (deadline ) {
97
96
timeLeft := deadline .Sub (time .Now ())
98
- e2elog .Logf ("Still running...%v left" , timeLeft )
97
+ framework .Logf ("Still running...%v left" , timeLeft )
99
98
if timeLeft < reportingPeriod {
100
99
time .Sleep (timeLeft )
101
100
} else {
@@ -109,13 +108,13 @@ func runResourceTrackingTest(f *framework.Framework, podsPerNode int, nodeNames
109
108
usageSummary , err := rm .GetLatest ()
110
109
framework .ExpectNoError (err )
111
110
// TODO(random-liu): Remove the original log when we migrate to new perfdash
112
- e2elog .Logf ("%s" , rm .FormatResourceUsage (usageSummary ))
111
+ framework .Logf ("%s" , rm .FormatResourceUsage (usageSummary ))
113
112
// Log perf result
114
113
printPerfData (e2eperf .ResourceUsageToPerfData (rm .GetMasterNodeLatest (usageSummary )))
115
114
verifyMemoryLimits (f .ClientSet , expectedMemory , usageSummary )
116
115
117
116
cpuSummary := rm .GetCPUSummary ()
118
- e2elog .Logf ("%s" , rm .FormatCPUSummary (cpuSummary ))
117
+ framework .Logf ("%s" , rm .FormatCPUSummary (cpuSummary ))
119
118
// Log perf result
120
119
printPerfData (e2eperf .CPUUsageToPerfData (rm .GetMasterNodeCPUSummary (cpuSummary )))
121
120
verifyCPULimits (expectedCPU , cpuSummary )
@@ -149,14 +148,14 @@ func verifyMemoryLimits(c clientset.Interface, expected e2ekubelet.ResourceUsage
149
148
errList = append (errList , fmt .Sprintf ("node %v:\n %s" , nodeName , strings .Join (nodeErrs , ", " )))
150
149
heapStats , err := e2ekubelet .GetKubeletHeapStats (c , nodeName )
151
150
if err != nil {
152
- e2elog .Logf ("Unable to get heap stats from %q" , nodeName )
151
+ framework .Logf ("Unable to get heap stats from %q" , nodeName )
153
152
} else {
154
- e2elog .Logf ("Heap stats on %q\n :%v" , nodeName , heapStats )
153
+ framework .Logf ("Heap stats on %q\n :%v" , nodeName , heapStats )
155
154
}
156
155
}
157
156
}
158
157
if len (errList ) > 0 {
159
- e2elog .Failf ("Memory usage exceeding limits:\n %s" , strings .Join (errList , "\n " ))
158
+ framework .Failf ("Memory usage exceeding limits:\n %s" , strings .Join (errList , "\n " ))
160
159
}
161
160
}
162
161
@@ -190,7 +189,7 @@ func verifyCPULimits(expected e2ekubelet.ContainersCPUSummary, actual e2ekubelet
190
189
}
191
190
}
192
191
if len (errList ) > 0 {
193
- e2elog .Failf ("CPU usage exceeding limits:\n %s" , strings .Join (errList , "\n " ))
192
+ framework .Failf ("CPU usage exceeding limits:\n %s" , strings .Join (errList , "\n " ))
194
193
}
195
194
}
196
195
@@ -215,7 +214,7 @@ var _ = SIGDescribe("Kubelet [Serial] [Slow]", func() {
215
214
ginkgo .AfterEach (func () {
216
215
rm .Stop ()
217
216
result := om .GetLatestRuntimeOperationErrorRate ()
218
- e2elog .Logf ("runtime operation error metrics:\n %s" , e2ekubelet .FormatRuntimeOperationErrorRate (result ))
217
+ framework .Logf ("runtime operation error metrics:\n %s" , e2ekubelet .FormatRuntimeOperationErrorRate (result ))
219
218
})
220
219
SIGDescribe ("regular resource usage tracking [Feature:RegularResourceUsageTracking]" , func () {
221
220
// We assume that the scheduler will make reasonable scheduling choices
@@ -287,6 +286,6 @@ var _ = SIGDescribe("Kubelet [Serial] [Slow]", func() {
287
286
func printPerfData (p * perftype.PerfData ) {
288
287
// Notice that we must make sure the perftype.PerfResultEnd is in a new line.
289
288
if str := e2emetrics .PrettyPrintJSON (p ); str != "" {
290
- e2elog .Logf ("%s %s\n %s" , perftype .PerfResultTag , str , perftype .PerfResultEnd )
289
+ framework .Logf ("%s %s\n %s" , perftype .PerfResultTag , str , perftype .PerfResultEnd )
291
290
}
292
291
}
0 commit comments