@@ -254,7 +254,7 @@ func TestNodeResourceTopology(t *testing.T) {
254
254
pod : makePodByResourceList (& v1.ResourceList {
255
255
nicResourceName : * resource .NewQuantity (20 , resource .DecimalSI )}),
256
256
node : nodes [2 ],
257
- wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod: " ),
257
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod" ),
258
258
},
259
259
{
260
260
name : "Best effort QoS requesting devices, Container Scope Topology policy; pod fit" ,
@@ -268,7 +268,7 @@ func TestNodeResourceTopology(t *testing.T) {
268
268
pod : makePodByResourceList (& v1.ResourceList {
269
269
nicResourceName : * resource .NewQuantity (20 , resource .DecimalSI )}),
270
270
node : nodes [0 ],
271
- wantStatus : framework .NewStatus (framework .Unschedulable , fmt . Sprintf ( "cannot align container: %s" , containerName ) ),
271
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align container" ),
272
272
},
273
273
{
274
274
name : "Best effort QoS requesting devices and extended resources, Container Scope Topology policy; pod doesn't fit" ,
@@ -291,7 +291,7 @@ func TestNodeResourceTopology(t *testing.T) {
291
291
nicResourceName : * resource .NewQuantity (11 , resource .DecimalSI )},
292
292
),
293
293
node : nodes [1 ],
294
- wantStatus : framework .NewStatus (framework .Unschedulable , fmt . Sprintf ( "cannot align container: %s" , containerName ) ),
294
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align container" ),
295
295
},
296
296
{
297
297
name : "Best effort QoS, requesting CPU, memory (enough on NUMA) and devices (not enough), Pod Scope Topology policy; pod doesn't fit" ,
@@ -306,7 +306,7 @@ func TestNodeResourceTopology(t *testing.T) {
306
306
nicResourceName : * resource .NewQuantity (6 , resource .DecimalSI )},
307
307
),
308
308
node : nodes [2 ],
309
- wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod: " ),
309
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod" ),
310
310
},
311
311
{
312
312
name : "Best effort QoS requesting CPU, memory (enough on NUMA) and devices, Pod Scope Topology policy; pod fit" ,
@@ -427,15 +427,15 @@ func TestNodeResourceTopology(t *testing.T) {
427
427
v1 .ResourceCPU : * resource .NewQuantity (4 , resource .DecimalSI ),
428
428
nicResourceName : * resource .NewQuantity (11 , resource .DecimalSI )}),
429
429
node : nodes [1 ],
430
- wantStatus : framework .NewStatus (framework .Unschedulable , fmt . Sprintf ( "cannot align container: %s" , containerName ) ),
430
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align container" ),
431
431
},
432
432
{
433
433
name : "Burstable QoS, requesting CPU and devices (not enough), Pod Scope Topology policy; pod doesn't fit" ,
434
434
pod : makePodByResourceList (& v1.ResourceList {
435
435
v1 .ResourceCPU : * resource .NewQuantity (2 , resource .DecimalSI ),
436
436
nicResourceName : * resource .NewQuantity (6 , resource .DecimalSI )}),
437
437
node : nodes [2 ],
438
- wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod: " ),
438
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod" ),
439
439
},
440
440
{
441
441
name : "Burstable QoS requesting CPU (enough on NUMA) and devices, Pod Scope Topology policy; pod fit" ,
@@ -475,15 +475,15 @@ func TestNodeResourceTopology(t *testing.T) {
475
475
v1 .ResourceMemory : resource .MustParse ("2Gi" ),
476
476
nicResourceName : * resource .NewQuantity (11 , resource .DecimalSI )}),
477
477
node : nodes [1 ],
478
- wantStatus : framework .NewStatus (framework .Unschedulable , fmt . Sprintf ( "cannot align container: %s" , containerName ) ),
478
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align container" ),
479
479
},
480
480
{
481
481
name : "Burstable QoS, requesting memory (enough on NUMA) and devices (not enough), Pod Scope Topology policy; pod doesn't fit" ,
482
482
pod : makePodByResourceList (& v1.ResourceList {
483
483
v1 .ResourceMemory : resource .MustParse ("2Gi" ),
484
484
nicResourceName : * resource .NewQuantity (6 , resource .DecimalSI )}),
485
485
node : nodes [2 ],
486
- wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod: " ),
486
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod" ),
487
487
},
488
488
{
489
489
name : "Burstable QoS requesting memory (enough on NUMA) and devices, Pod Scope Topology policy; pod fit" ,
@@ -524,7 +524,7 @@ func TestNodeResourceTopology(t *testing.T) {
524
524
v1 .ResourceMemory : resource .MustParse ("4Gi" ),
525
525
nicResourceName : * resource .NewQuantity (11 , resource .DecimalSI )}),
526
526
node : nodes [1 ],
527
- wantStatus : framework .NewStatus (framework .Unschedulable , fmt . Sprintf ( "cannot align container: %s" , containerName ) ),
527
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align container" ),
528
528
},
529
529
{
530
530
name : "Burstable QoS, requesting CPU, memory (enough on NUMA) and devices (not enough), Pod Scope Topology policy; pod doesn't fit" ,
@@ -533,7 +533,7 @@ func TestNodeResourceTopology(t *testing.T) {
533
533
v1 .ResourceMemory : resource .MustParse ("2Gi" ),
534
534
nicResourceName : * resource .NewQuantity (6 , resource .DecimalSI )}),
535
535
node : nodes [2 ],
536
- wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod: " ),
536
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod" ),
537
537
},
538
538
{
539
539
name : "Burstable QoS requesting CPU, memory (enough on NUMA) and devices, Pod Scope Topology policy; pod fit" ,
@@ -588,7 +588,7 @@ func TestNodeResourceTopology(t *testing.T) {
588
588
hugepages2Mi : resource .MustParse ("256Mi" ),
589
589
nicResourceName : * resource .NewQuantity (3 , resource .DecimalSI )}),
590
590
node : nodes [1 ],
591
- wantStatus : framework .NewStatus (framework .Unschedulable , fmt . Sprintf ( "cannot align container: %s" , containerName ) ),
591
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align container" ),
592
592
},
593
593
{
594
594
name : "Guaranteed QoS, pod doesn't fit" ,
@@ -597,7 +597,7 @@ func TestNodeResourceTopology(t *testing.T) {
597
597
v1 .ResourceMemory : resource .MustParse ("1Gi" ),
598
598
nicResourceName : * resource .NewQuantity (3 , resource .DecimalSI )}),
599
599
node : nodes [0 ],
600
- wantStatus : framework .NewStatus (framework .Unschedulable , fmt . Sprintf ( "cannot align container: %s" , containerName ) ),
600
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align container" ),
601
601
},
602
602
{
603
603
name : "Guaranteed QoS, pod fit" ,
@@ -615,7 +615,7 @@ func TestNodeResourceTopology(t *testing.T) {
615
615
v1 .ResourceMemory : resource .MustParse ("1Gi" ),
616
616
notExistingNICResourceName : * resource .NewQuantity (0 , resource .DecimalSI )}, 3 ),
617
617
node : nodes [2 ],
618
- wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod: " ),
618
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod" ),
619
619
},
620
620
{
621
621
name : "Guaranteed QoS Topology Scope, minimal, pod fit" ,
@@ -649,7 +649,7 @@ func TestNodeResourceTopology(t *testing.T) {
649
649
v1 .ResourceMemory : resource .MustParse ("1Gi" ),
650
650
notExistingNICResourceName : * resource .NewQuantity (0 , resource .DecimalSI )}, 3 ),
651
651
node : nodes [3 ],
652
- wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod: " ),
652
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod" ),
653
653
},
654
654
{
655
655
name : "Guaranteed QoS, hugepages, non-NUMA affine NIC, pod fit" ,
@@ -791,7 +791,7 @@ func TestNodeResourceTopologyMultiContainerPodScope(t *testing.T) {
791
791
nodeTopologies [0 ],
792
792
},
793
793
avail : []resourceDescriptor {},
794
- wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod: testpod " ),
794
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod" ),
795
795
},
796
796
{
797
797
name : "gu pod does not fit - not enough memory available on any NUMA node" ,
@@ -818,7 +818,7 @@ func TestNodeResourceTopologyMultiContainerPodScope(t *testing.T) {
818
818
nodeTopologies [0 ],
819
819
},
820
820
avail : []resourceDescriptor {},
821
- wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod: testpod " ),
821
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod" ),
822
822
},
823
823
{
824
824
name : "gu pod does not fit - not enough Hugepages available on any NUMA node" ,
@@ -845,7 +845,7 @@ func TestNodeResourceTopologyMultiContainerPodScope(t *testing.T) {
845
845
nodeTopologies [0 ],
846
846
},
847
847
avail : []resourceDescriptor {},
848
- wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod: testpod " ),
848
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod" ),
849
849
},
850
850
{
851
851
name : "gu pod does not fit - not enough devices available on any NUMA node" ,
@@ -872,7 +872,7 @@ func TestNodeResourceTopologyMultiContainerPodScope(t *testing.T) {
872
872
nodeTopologies [0 ],
873
873
},
874
874
avail : []resourceDescriptor {},
875
- wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod: testpod " ),
875
+ wantStatus : framework .NewStatus (framework .Unschedulable , "cannot align pod" ),
876
876
},
877
877
}
878
878
@@ -967,21 +967,21 @@ func TestNodeResourceTopologyMultiContainerContainerScope(t *testing.T) {
967
967
cntReq : []map [string ]string {
968
968
{cpu : "40" , memory : "4G" },
969
969
},
970
- statusErr : "cannot align container: cnt-1" ,
970
+ statusErr : "cannot align container" , // cnt-1
971
971
},
972
972
{
973
973
description : "[2][tier3] single container with memory over allocation - fit" ,
974
974
cntReq : []map [string ]string {
975
975
{cpu : "2" , memory : "100G" },
976
976
},
977
- statusErr : "cannot align container: cnt-1" ,
977
+ statusErr : "cannot align container" , // cnt-1
978
978
},
979
979
{
980
980
description : "[2][tier3] single container with cpu and memory over allocation - fit" ,
981
981
cntReq : []map [string ]string {
982
982
{cpu : "40" , memory : "100G" },
983
983
},
984
- statusErr : "cannot align container: cnt-1" ,
984
+ statusErr : "cannot align container" , // cnt-1
985
985
},
986
986
{
987
987
description : "[4][tier2] multi-containers with good allocation, spread across NUMAs - fit" ,
@@ -1006,7 +1006,7 @@ func TestNodeResourceTopologyMultiContainerContainerScope(t *testing.T) {
1006
1006
{cpu : "1" , memory : "4G" },
1007
1007
{cpu : "1" , memory : "4G" },
1008
1008
},
1009
- statusErr : "cannot align init container: cnt-1" ,
1009
+ statusErr : "cannot align init container" , // cnt-1
1010
1010
},
1011
1011
{
1012
1012
description : "[7][tier1] init container with memory over allocation, multi-containers with good allocation - not fit" ,
@@ -1017,7 +1017,7 @@ func TestNodeResourceTopologyMultiContainerContainerScope(t *testing.T) {
1017
1017
{cpu : "1" , memory : "4G" },
1018
1018
{cpu : "1" , memory : "4G" },
1019
1019
},
1020
- statusErr : "cannot align init container: cnt-1" ,
1020
+ statusErr : "cannot align init container" , // cnt-1
1021
1021
},
1022
1022
{
1023
1023
description : "[11][tier1] init container with good allocation, multi-containers spread across NUMAs - fit" ,
@@ -1053,7 +1053,7 @@ func TestNodeResourceTopologyMultiContainerContainerScope(t *testing.T) {
1053
1053
{cpu : "20" , memory : "40G" },
1054
1054
{cpu : "20" , memory : "6G" },
1055
1055
},
1056
- statusErr : "cannot align container: cnt-3" ,
1056
+ statusErr : "cannot align container" , // cnt-3
1057
1057
},
1058
1058
{
1059
1059
description : "[27][tier1] multi init containers with good allocation, container with cpu over allocation - not fit" ,
@@ -1064,7 +1064,7 @@ func TestNodeResourceTopologyMultiContainerContainerScope(t *testing.T) {
1064
1064
cntReq : []map [string ]string {
1065
1065
{cpu : "35" , memory : "40G" },
1066
1066
},
1067
- statusErr : "cannot align container: cnt-1" ,
1067
+ statusErr : "cannot align container" , // cnt-1
1068
1068
},
1069
1069
{
1070
1070
description : "[28][tier1] multi init containers with good allocation, multi-containers with good allocation - fit" ,
@@ -1114,7 +1114,7 @@ func TestNodeResourceTopologyMultiContainerContainerScope(t *testing.T) {
1114
1114
{cpu : "20" , memory : "40G" },
1115
1115
{cpu : "2" , memory : "6G" },
1116
1116
},
1117
- statusErr : "cannot align init container: cnt-1" ,
1117
+ statusErr : "cannot align init container" , // cnt-1
1118
1118
},
1119
1119
{
1120
1120
description : "[32][tier1] multi init containers with over memory allocation - not fit" ,
@@ -1127,7 +1127,7 @@ func TestNodeResourceTopologyMultiContainerContainerScope(t *testing.T) {
1127
1127
{cpu : "20" , memory : "40G" },
1128
1128
{cpu : "2" , memory : "6G" },
1129
1129
},
1130
- statusErr : "cannot align init container: cnt-2" ,
1130
+ statusErr : "cannot align init container" , // cnt-2
1131
1131
},
1132
1132
}
1133
1133
0 commit comments