@@ -240,6 +240,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
240
240
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
241
241
}()
242
242
243
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
244
+ time .Sleep (2 * time .Minute )
245
+
243
246
ginkgo .By ("Read zonal-2 storage policy tagged to wcp namespace" )
244
247
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , storagePolicyName , metav1.GetOptions {})
245
248
if ! apierrors .IsNotFound (err ) {
@@ -319,6 +322,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
319
322
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
320
323
}()
321
324
325
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
326
+ time .Sleep (2 * time .Minute )
327
+
322
328
ginkgo .By ("Fetch zone-1 storage policy tagged to wcp namespace" )
323
329
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , storagePolicyName , metav1.GetOptions {})
324
330
if ! apierrors .IsNotFound (err ) {
@@ -373,9 +379,12 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
373
379
replicas = 3
374
380
375
381
// reading zonal storage policy of zone-2 wrkld domain
376
- storagePolicyNameWffc := GetAndExpectStringEnvVar (envZonal2StoragePolicyNameLateBidning )
377
382
storagePolicyNameImm := GetAndExpectStringEnvVar (envZonal2StoragePolicyName )
378
383
storageProfileId = e2eVSphere .GetSpbmPolicyID (storagePolicyNameImm )
384
+
385
+ // append late-binding now as it knowns to k8s and not to vc
386
+ storagePolicyNameWffc := storagePolicyNameImm + "-latebinding"
387
+
379
388
/*
380
389
EX - zone -> zone-1, zone-2, zone-3, zone-4
381
390
so topValStartIndex=1 and topValEndIndex=2 will fetch the 1st index value from topology map string
@@ -396,6 +405,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
396
405
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
397
406
}()
398
407
408
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
409
+ time .Sleep (2 * time .Minute )
410
+
399
411
ginkgo .By ("Fetch zone-2 storage policy tagged to wcp namespace" )
400
412
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , storagePolicyNameWffc , metav1.GetOptions {})
401
413
if ! apierrors .IsNotFound (err ) {
@@ -467,11 +479,11 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
467
479
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
468
480
469
481
/*
470
- EX - zone -> zone-1, zone-2, zone-3, zone-4, zone-5
482
+ EX - zone -> zone-1, zone-2, zone-3, zone-4
471
483
so topValStartIndex=1 and topValEndIndex=3 will fetch the 2nd and 3rd index from topology map string
472
484
*/
473
485
topValStartIndex := 0
474
- topValEndIndex := 5
486
+ topValEndIndex := 4
475
487
476
488
ginkgo .By ("Fetching allowed topology assigned to all zones" )
477
489
allowedTopologies = setSpecificAllowedTopology (allowedTopologies , topkeyStartIndex , topValStartIndex ,
@@ -488,6 +500,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
488
500
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
489
501
}()
490
502
503
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
504
+ time .Sleep (2 * time .Minute )
505
+
491
506
ginkgo .By ("Fetch shared storage policy tagged to wcp namespace" )
492
507
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , storagePolicyName , metav1.GetOptions {})
493
508
if ! apierrors .IsNotFound (err ) {
@@ -499,24 +514,13 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
499
514
diskSize , storageclass , true )
500
515
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
501
516
volHandle := persistentVolumes [0 ].Spec .CSI .VolumeHandle
502
- defer func () {
503
- err := fpv .DeletePersistentVolumeClaim (ctx , client , pvclaim .Name , namespace )
504
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
505
- err = e2eVSphere .waitForCNSVolumeToBeDeleted (volHandle )
506
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
507
- }()
508
517
509
518
ginkgo .By ("Creating a Deployment using pvc" )
510
519
dep , err := createDeployment (ctx , client , 1 , labelsMap , nil , namespace ,
511
520
[]* v1.PersistentVolumeClaim {pvclaim }, execRWXCommandPod1 , false , busyBoxImageOnGcr )
512
521
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
513
522
podList , err := fdep .GetPodsForDeployment (ctx , client , dep )
514
523
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
515
- defer func () {
516
- ginkgo .By ("Delete Deployment" )
517
- err := client .AppsV1 ().Deployments (namespace ).Delete (ctx , dep .Name , metav1.DeleteOptions {})
518
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
519
- }()
520
524
521
525
ginkgo .By ("Verify the volume is accessible and Read/write is possible" )
522
526
output := readFileFromPod (namespace , podList .Items [0 ].Name , filePathPod1 )
@@ -531,17 +535,11 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
531
535
gomega .Expect (strings .Contains (output2 , "Hello message from Pod1" )).NotTo (gomega .BeFalse ())
532
536
533
537
ginkgo .By ("Creating service" )
534
- service := CreateService (namespace , client )
535
- defer func () {
536
- deleteService (namespace , client , service )
537
- }()
538
+ _ = CreateService (namespace , client )
538
539
539
540
ginkgo .By ("Creating statefulset" )
540
541
statefulset := createCustomisedStatefulSets (ctx , client , namespace , true , replicas , false , nil ,
541
542
false , true , "" , "" , storageclass , storageclass .Name )
542
- defer func () {
543
- fss .DeleteAllStatefulSets (ctx , client , namespace )
544
- }()
545
543
546
544
ginkgo .By ("Verify svc pv affinity, pvc annotation and pod node affinity" )
547
545
err = verifyPvcAnnotationPvAffinityPodAnnotationInSvc (ctx , client , statefulset , nil , dep , namespace ,
@@ -569,46 +567,19 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
569
567
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
570
568
571
569
ginkgo .By ("Create a dynamic volume snapshot" )
572
- volumeSnapshot , snapshotContent , snapshotCreated ,
573
- snapshotContentCreated , snapshotId , _ , err := createDynamicVolumeSnapshot (ctx , namespace , snapc ,
570
+ volumeSnapshot , _ , _ ,
571
+ _ , snapshotId , _ , err := createDynamicVolumeSnapshot (ctx , namespace , snapc ,
574
572
volumeSnapshotClass , pvclaim , volHandle , diskSize , true )
575
573
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
576
- defer func () {
577
- if snapshotContentCreated {
578
- err = deleteVolumeSnapshotContent (ctx , snapshotContent , snapc , pandoraSyncWaitTime )
579
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
580
- }
581
-
582
- if snapshotCreated {
583
- framework .Logf ("Deleting volume snapshot" )
584
- deleteVolumeSnapshotWithPandoraWait (ctx , snapc , namespace , volumeSnapshot .Name , pandoraSyncWaitTime )
585
-
586
- framework .Logf ("Wait till the volume snapshot is deleted" )
587
- err = waitForVolumeSnapshotContentToBeDeletedWithPandoraWait (ctx , snapc ,
588
- * volumeSnapshot .Status .BoundVolumeSnapshotContentName , pandoraSyncWaitTime )
589
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
590
- }
591
- }()
592
574
593
575
ginkgo .By ("Mark zone-2 for removal from wcp namespace" )
594
576
err = markZoneForRemovalFromWcpNs (vcRestSessionId , namespace ,
595
577
topologyAffinityDetails [topologyCategories [0 ]][1 ]) // this will fetch zone-2
596
578
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
597
579
598
580
ginkgo .By ("Restore a volume snapshot" )
599
- pvclaim2 , pvs2 , pod2 := verifyVolumeRestoreOperation (ctx , client , namespace , storageclass ,
581
+ _ , _ , pod2 := verifyVolumeRestoreOperation (ctx , client , namespace , storageclass ,
600
582
volumeSnapshot , diskSize , true )
601
- volHandle2 := pvs2 [0 ].Spec .CSI .VolumeHandle
602
- defer func () {
603
- ginkgo .By (fmt .Sprintf ("Deleting the pod %s in namespace %s" , pod2 .Name , namespace ))
604
- err = fpod .DeletePodWithWait (ctx , client , pod2 )
605
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
606
-
607
- err := fpv .DeletePersistentVolumeClaim (ctx , client , pvclaim2 .Name , namespace )
608
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
609
- err = e2eVSphere .waitForCNSVolumeToBeDeleted (volHandle2 )
610
- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
611
- }()
612
583
613
584
ginkgo .By ("Perform scaling operation on statefulset. Increase the replica count to 9 when zone is marked" +
614
585
" for removal" )
@@ -622,7 +593,7 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
622
593
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
623
594
624
595
ginkgo .By ("Delete dynamic volume snapshot" )
625
- snapshotCreated , snapshotContentCreated , err = deleteVolumeSnapshot (ctx , snapc , namespace ,
596
+ _ , _ , err = deleteVolumeSnapshot (ctx , snapc , namespace ,
626
597
volumeSnapshot , pandoraSyncWaitTime , volHandle , snapshotId , true )
627
598
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
628
599
})
@@ -665,6 +636,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
665
636
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
666
637
}()
667
638
639
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
640
+ time .Sleep (2 * time .Minute )
641
+
668
642
ginkgo .By ("Read shared storage policy tagged to wcp namespace" )
669
643
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , sharedStoragePolicyName , metav1.GetOptions {})
670
644
if ! apierrors .IsNotFound (err ) {
@@ -737,6 +711,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
737
711
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
738
712
}()
739
713
714
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
715
+ time .Sleep (2 * time .Minute )
716
+
740
717
ginkgo .By ("Read shared storage policy tagged to wcp namespace" )
741
718
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , sharedStoragePolicyName , metav1.GetOptions {})
742
719
if ! apierrors .IsNotFound (err ) {
@@ -854,6 +831,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
854
831
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
855
832
}()
856
833
834
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
835
+ time .Sleep (2 * time .Minute )
836
+
857
837
ginkgo .By ("Read zonal storage policy of zone3" )
858
838
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , zonalStoragePolicyZone3 , metav1.GetOptions {})
859
839
if ! apierrors .IsNotFound (err ) {
@@ -910,14 +890,14 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
910
890
// reading zonal storage policy of zone-1 and zone-2
911
891
storagePolicyNameZ1 := GetAndExpectStringEnvVar (envZonal1StoragePolicyName )
912
892
storageProfileIdZ1 := e2eVSphere .GetSpbmPolicyID (storagePolicyNameZ1 )
913
- storagePolicyNameZ2 := GetAndExpectStringEnvVar (envZonal2StoragePolicyNameLateBidning )
893
+ storagePolicyNameZ2 := GetAndExpectStringEnvVar (envZonal2StoragePolicyName )
914
894
storageProfileIdZ2 := e2eVSphere .GetSpbmPolicyID (storagePolicyNameZ2 )
915
895
916
896
// append late-binding now as it knowns to k8s and not to vc
917
897
storagePolicyNameZ2 = storagePolicyNameZ2 + "-latebinding"
918
898
919
899
// read datastore url
920
- zonal2DsUrl := os .Getenv (envZonal2DatastoreUrl )
900
+ zonal2DsUrl := os .Getenv (envZone2DatastoreUrl )
921
901
922
902
ginkgo .By ("Create a WCP namespace tagged to zone-1 & zone-2" )
923
903
namespace , statuscode , err = createtWcpNsWithZonesAndPolicies (vcRestSessionId ,
@@ -930,6 +910,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
930
910
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
931
911
}()
932
912
913
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
914
+ time .Sleep (2 * time .Minute )
915
+
933
916
ginkgo .By ("Fetch storage class tagged to wcp namespace" )
934
917
storageClassNames := []string {sharedStoragePolicyName , storagePolicyNameZ1 , storagePolicyNameZ2 }
935
918
storageClasses := make ([]* storagev1.StorageClass , len (storageClassNames ))
@@ -1153,6 +1136,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
1153
1136
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
1154
1137
}()
1155
1138
1139
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
1140
+ time .Sleep (2 * time .Minute )
1141
+
1156
1142
storageClassNames := []string {storagePolicyNameZ1 , sharedStoragePolicyName }
1157
1143
storageClasses := make ([]* storagev1.StorageClass , len (storageClassNames ))
1158
1144
for i , name := range storageClassNames {
@@ -1307,6 +1293,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
1307
1293
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
1308
1294
}()
1309
1295
1296
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
1297
+ time .Sleep (2 * time .Minute )
1298
+
1310
1299
// Create PVCs
1311
1300
ginkgo .By ("Create 2 PVCs with different binding modes" )
1312
1301
storageClassList := []* storagev1.StorageClass {zonalStorageClass , sharedStorageClass }
@@ -1339,7 +1328,6 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
1339
1328
deployments := []* appsv1.Deployment {}
1340
1329
depSpecs := [][]* v1.PersistentVolumeClaim {
1341
1330
{pvcList [0 ], pvcList [1 ]},
1342
- {pvcList [2 ]},
1343
1331
}
1344
1332
for _ , pvcSet := range depSpecs {
1345
1333
dep , err := createDeployment (ctx , client , 1 , labelsMap , nil , namespace ,
@@ -1524,6 +1512,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
1524
1512
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
1525
1513
}()
1526
1514
1515
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
1516
+ time .Sleep (2 * time .Minute )
1517
+
1527
1518
ginkgo .By ("Create static volume" )
1528
1519
_ , _ , staticPvc , staticPv , err := createStaticVolumeOnSvc (ctx , client ,
1529
1520
namespace , storageDatastoreUrlZone2 , storagePolicyName )
@@ -1645,6 +1636,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
1645
1636
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
1646
1637
}()
1647
1638
1639
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
1640
+ time .Sleep (2 * time .Minute )
1641
+
1648
1642
ginkgo .By ("Read zonal class" )
1649
1643
storageclassImm , err := client .StorageV1 ().StorageClasses ().Get (ctx , zonalPolicy , metav1.GetOptions {})
1650
1644
if ! apierrors .IsNotFound (err ) {
0 commit comments