@@ -51,7 +51,6 @@ import (
51
51
api "k8s.io/kubernetes/pkg/apis/core"
52
52
"k8s.io/kubernetes/pkg/apis/extensions"
53
53
"k8s.io/kubernetes/test/e2e/framework"
54
- e2elog "k8s.io/kubernetes/test/e2e/framework/log"
55
54
e2emetrics "k8s.io/kubernetes/test/e2e/framework/metrics"
56
55
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
57
56
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
@@ -163,7 +162,7 @@ func density30AddonResourceVerifier(numNodes int) map[string]framework.ResourceC
163
162
controllerMem = math .MaxUint64
164
163
schedulerCPU := math .MaxFloat32
165
164
schedulerMem = math .MaxUint64
166
- e2elog .Logf ("Setting resource constraints for provider: %s" , framework .TestContext .Provider )
165
+ framework .Logf ("Setting resource constraints for provider: %s" , framework .TestContext .Provider )
167
166
if framework .ProviderIs ("kubemark" ) {
168
167
if numNodes <= 5 {
169
168
apiserverCPU = 0.35
@@ -301,7 +300,7 @@ func logPodStartupStatus(
301
300
}
302
301
// Log status of the pods.
303
302
startupStatus := testutils .ComputeRCStartupStatus (podStore .List (), expectedPods )
304
- e2elog .Logf (startupStatus .String ("Density" ))
303
+ framework .Logf (startupStatus .String ("Density" ))
305
304
// Compute scheduling throughput for the latest time period.
306
305
throughput := float64 (startupStatus .Scheduled - lastScheduledCount ) / float64 (period / time .Second )
307
306
* scheduleThroughputs = append (* scheduleThroughputs , throughput )
@@ -346,8 +345,8 @@ func runDensityTest(dtc DensityTestConfig, testPhaseDurations *timer.TestPhaseTi
346
345
startupTime := time .Since (startTime )
347
346
close (logStopCh )
348
347
close (schedulerProfilingStopCh )
349
- e2elog .Logf ("E2E startup time for %d pods: %v" , dtc .PodCount , startupTime )
350
- e2elog .Logf ("Throughput (pods/s) during cluster saturation phase: %v" , float32 (dtc .PodCount )/ float32 (startupTime / time .Second ))
348
+ framework .Logf ("E2E startup time for %d pods: %v" , dtc .PodCount , startupTime )
349
+ framework .Logf ("Throughput (pods/s) during cluster saturation phase: %v" , float32 (dtc .PodCount )/ float32 (startupTime / time .Second ))
351
350
replicationCtrlStartupPhase .End ()
352
351
353
352
// Grabbing scheduler memory profile after cluster saturation finished.
@@ -376,7 +375,7 @@ func runDensityTest(dtc DensityTestConfig, testPhaseDurations *timer.TestPhaseTi
376
375
}
377
376
sort .Strings (nodeNames )
378
377
for _ , node := range nodeNames {
379
- e2elog .Logf ("%v: %v pause pods, system pods: %v" , node , pausePodAllocation [node ], systemPodAllocation [node ])
378
+ framework .Logf ("%v: %v pause pods, system pods: %v" , node , pausePodAllocation [node ], systemPodAllocation [node ])
380
379
}
381
380
defer printPodAllocationPhase .End ()
382
381
return startupTime
@@ -449,7 +448,7 @@ var _ = SIGDescribe("Density", func() {
449
448
NumberOfPods : totalPods ,
450
449
Throughput : float32 (totalPods ) / float32 (e2eStartupTime / time .Second ),
451
450
}
452
- e2elog .Logf ("Cluster saturation time: %s" , e2emetrics .PrettyPrintJSON (saturationData ))
451
+ framework .Logf ("Cluster saturation time: %s" , e2emetrics .PrettyPrintJSON (saturationData ))
453
452
454
453
summaries := make ([]framework.TestDataSummary , 0 , 2 )
455
454
// Verify latency metrics.
@@ -525,7 +524,7 @@ var _ = SIGDescribe("Density", func() {
525
524
526
525
_ , nodes , err = e2enode .GetMasterAndWorkerNodes (c )
527
526
if err != nil {
528
- e2elog .Logf ("Unexpected error occurred: %v" , err )
527
+ framework .Logf ("Unexpected error occurred: %v" , err )
529
528
}
530
529
// TODO: write a wrapper for ExpectNoErrorWithOffset()
531
530
framework .ExpectNoErrorWithOffset (0 , err )
@@ -548,7 +547,7 @@ var _ = SIGDescribe("Density", func() {
548
547
framework .ExpectNoError (e2emetrics .ResetMetrics (c ))
549
548
framework .ExpectNoError (os .Mkdir (fmt .Sprintf (framework .TestContext .OutputDir + "/%s" , uuid ), 0777 ))
550
549
551
- e2elog .Logf ("Listing nodes for easy debugging:\n " )
550
+ framework .Logf ("Listing nodes for easy debugging:\n " )
552
551
for _ , node := range nodes .Items {
553
552
var internalIP , externalIP string
554
553
for _ , address := range node .Status .Addresses {
@@ -559,7 +558,7 @@ var _ = SIGDescribe("Density", func() {
559
558
externalIP = address .Address
560
559
}
561
560
}
562
- e2elog .Logf ("Name: %v, clusterIP: %v, externalIP: %v" , node .ObjectMeta .Name , internalIP , externalIP )
561
+ framework .Logf ("Name: %v, clusterIP: %v, externalIP: %v" , node .ObjectMeta .Name , internalIP , externalIP )
563
562
}
564
563
565
564
// Start apiserver CPU profile gatherer with frequency based on cluster size.
@@ -688,7 +687,7 @@ var _ = SIGDescribe("Density", func() {
688
687
Client : clients [i ],
689
688
Name : secretName ,
690
689
Namespace : nsName ,
691
- LogFunc : e2elog .Logf ,
690
+ LogFunc : framework .Logf ,
692
691
})
693
692
secretNames = append (secretNames , secretName )
694
693
}
@@ -700,7 +699,7 @@ var _ = SIGDescribe("Density", func() {
700
699
Client : clients [i ],
701
700
Name : configMapName ,
702
701
Namespace : nsName ,
703
- LogFunc : e2elog .Logf ,
702
+ LogFunc : framework .Logf ,
704
703
})
705
704
configMapNames = append (configMapNames , configMapName )
706
705
}
@@ -720,7 +719,7 @@ var _ = SIGDescribe("Density", func() {
720
719
MemRequest : nodeMemCapacity / 100 ,
721
720
MaxContainerFailures : & MaxContainerFailures ,
722
721
Silent : true ,
723
- LogFunc : e2elog .Logf ,
722
+ LogFunc : framework .Logf ,
724
723
SecretNames : secretNames ,
725
724
ConfigMapNames : configMapNames ,
726
725
ServiceAccountTokenProjections : itArg .svcacctTokenProjectionsPerPod ,
@@ -748,7 +747,7 @@ var _ = SIGDescribe("Density", func() {
748
747
case batch .Kind ("Job" ):
749
748
configs [i ] = & testutils.JobConfig {RCConfig : * baseConfig }
750
749
default :
751
- e2elog .Failf ("Unsupported kind: %v" , itArg .kind )
750
+ framework .Failf ("Unsupported kind: %v" , itArg .kind )
752
751
}
753
752
}
754
753
@@ -772,7 +771,7 @@ var _ = SIGDescribe("Density", func() {
772
771
Client : f .ClientSet ,
773
772
Name : fmt .Sprintf ("density-daemon-%v" , i ),
774
773
Namespace : f .Namespace .Name ,
775
- LogFunc : e2elog .Logf ,
774
+ LogFunc : framework .Logf ,
776
775
})
777
776
}
778
777
e2eStartupTime = runDensityTest (dConfig , testPhaseDurations , & scheduleThroughputs )
@@ -812,7 +811,7 @@ var _ = SIGDescribe("Density", func() {
812
811
if startTime != metav1 .NewTime (time.Time {}) {
813
812
runTimes [p .Name ] = startTime
814
813
} else {
815
- e2elog .Failf ("Pod %v is reported to be running, but none of its containers is" , p .Name )
814
+ framework .Failf ("Pod %v is reported to be running, but none of its containers is" , p .Name )
816
815
}
817
816
}
818
817
}
@@ -842,15 +841,15 @@ var _ = SIGDescribe("Density", func() {
842
841
AddFunc : func (obj interface {}) {
843
842
p , ok := obj .(* v1.Pod )
844
843
if ! ok {
845
- e2elog .Logf ("Failed to cast observed object to *v1.Pod." )
844
+ framework .Logf ("Failed to cast observed object to *v1.Pod." )
846
845
}
847
846
framework .ExpectEqual (ok , true )
848
847
go checkPod (p )
849
848
},
850
849
UpdateFunc : func (oldObj , newObj interface {}) {
851
850
p , ok := newObj .(* v1.Pod )
852
851
if ! ok {
853
- e2elog .Logf ("Failed to cast observed object to *v1.Pod." )
852
+ framework .Logf ("Failed to cast observed object to *v1.Pod." )
854
853
}
855
854
framework .ExpectEqual (ok , true )
856
855
go checkPod (p )
@@ -863,7 +862,7 @@ var _ = SIGDescribe("Density", func() {
863
862
}
864
863
for latencyPodsIteration := 0 ; latencyPodsIteration < latencyPodsIterations ; latencyPodsIteration ++ {
865
864
podIndexOffset := latencyPodsIteration * nodeCount
866
- e2elog .Logf ("Creating %d latency pods in range [%d, %d]" , nodeCount , podIndexOffset + 1 , podIndexOffset + nodeCount )
865
+ framework .Logf ("Creating %d latency pods in range [%d, %d]" , nodeCount , podIndexOffset + 1 , podIndexOffset + nodeCount )
867
866
868
867
watchTimesLen := len (watchTimes )
869
868
@@ -901,7 +900,7 @@ var _ = SIGDescribe("Density", func() {
901
900
waitTimeout := 10 * time .Minute
902
901
for start := time .Now (); len (watchTimes ) < watchTimesLen + nodeCount ; time .Sleep (10 * time .Second ) {
903
902
if time .Since (start ) < waitTimeout {
904
- e2elog .Failf ("Timeout reached waiting for all Pods being observed by the watch." )
903
+ framework .Failf ("Timeout reached waiting for all Pods being observed by the watch." )
905
904
}
906
905
}
907
906
@@ -913,7 +912,7 @@ var _ = SIGDescribe("Density", func() {
913
912
}
914
913
for node , count := range nodeToLatencyPods {
915
914
if count > 1 {
916
- e2elog .Logf ("%d latency pods scheduled on %s" , count , node )
915
+ framework .Logf ("%d latency pods scheduled on %s" , count , node )
917
916
}
918
917
}
919
918
}
@@ -961,22 +960,22 @@ var _ = SIGDescribe("Density", func() {
961
960
for name , create := range createTimes {
962
961
sched , ok := scheduleTimes [name ]
963
962
if ! ok {
964
- e2elog .Logf ("Failed to find schedule time for %v" , name )
963
+ framework .Logf ("Failed to find schedule time for %v" , name )
965
964
missingMeasurements ++
966
965
}
967
966
run , ok := runTimes [name ]
968
967
if ! ok {
969
- e2elog .Logf ("Failed to find run time for %v" , name )
968
+ framework .Logf ("Failed to find run time for %v" , name )
970
969
missingMeasurements ++
971
970
}
972
971
watch , ok := watchTimes [name ]
973
972
if ! ok {
974
- e2elog .Logf ("Failed to find watch time for %v" , name )
973
+ framework .Logf ("Failed to find watch time for %v" , name )
975
974
missingMeasurements ++
976
975
}
977
976
node , ok := nodeNames [name ]
978
977
if ! ok {
979
- e2elog .Logf ("Failed to find node for %v" , name )
978
+ framework .Logf ("Failed to find node for %v" , name )
980
979
missingMeasurements ++
981
980
}
982
981
@@ -1062,5 +1061,5 @@ func createRunningPodFromRC(wg *sync.WaitGroup, c clientset.Interface, name, ns,
1062
1061
}
1063
1062
framework .ExpectNoError (testutils .CreateRCWithRetries (c , ns , rc ))
1064
1063
framework .ExpectNoError (e2epod .WaitForControlledPodsRunning (c , ns , name , api .Kind ("ReplicationController" )))
1065
- e2elog .Logf ("Found pod '%s' running" , name )
1064
+ framework .Logf ("Found pod '%s' running" , name )
1066
1065
}
0 commit comments