@@ -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 ) {
@@ -396,6 +402,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
396
402
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
397
403
}()
398
404
405
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
406
+ time .Sleep (2 * time .Minute )
407
+
399
408
ginkgo .By ("Fetch zone-2 storage policy tagged to wcp namespace" )
400
409
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , storagePolicyNameWffc , metav1.GetOptions {})
401
410
if ! apierrors .IsNotFound (err ) {
@@ -467,11 +476,11 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
467
476
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
468
477
469
478
/*
470
- EX - zone -> zone-1, zone-2, zone-3, zone-4, zone-5
479
+ EX - zone -> zone-1, zone-2, zone-3, zone-4
471
480
so topValStartIndex=1 and topValEndIndex=3 will fetch the 2nd and 3rd index from topology map string
472
481
*/
473
482
topValStartIndex := 0
474
- topValEndIndex := 5
483
+ topValEndIndex := 4
475
484
476
485
ginkgo .By ("Fetching allowed topology assigned to all zones" )
477
486
allowedTopologies = setSpecificAllowedTopology (allowedTopologies , topkeyStartIndex , topValStartIndex ,
@@ -488,6 +497,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
488
497
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
489
498
}()
490
499
500
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
501
+ time .Sleep (2 * time .Minute )
502
+
491
503
ginkgo .By ("Fetch shared storage policy tagged to wcp namespace" )
492
504
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , storagePolicyName , metav1.GetOptions {})
493
505
if ! apierrors .IsNotFound (err ) {
@@ -499,24 +511,13 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
499
511
diskSize , storageclass , true )
500
512
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
501
513
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
514
509
515
ginkgo .By ("Creating a Deployment using pvc" )
510
516
dep , err := createDeployment (ctx , client , 1 , labelsMap , nil , namespace ,
511
517
[]* v1.PersistentVolumeClaim {pvclaim }, execRWXCommandPod1 , false , busyBoxImageOnGcr )
512
518
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
513
519
podList , err := fdep .GetPodsForDeployment (ctx , client , dep )
514
520
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
521
521
522
ginkgo .By ("Verify the volume is accessible and Read/write is possible" )
522
523
output := readFileFromPod (namespace , podList .Items [0 ].Name , filePathPod1 )
@@ -531,17 +532,11 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
531
532
gomega .Expect (strings .Contains (output2 , "Hello message from Pod1" )).NotTo (gomega .BeFalse ())
532
533
533
534
ginkgo .By ("Creating service" )
534
- service := CreateService (namespace , client )
535
- defer func () {
536
- deleteService (namespace , client , service )
537
- }()
535
+ _ = CreateService (namespace , client )
538
536
539
537
ginkgo .By ("Creating statefulset" )
540
538
statefulset := createCustomisedStatefulSets (ctx , client , namespace , true , replicas , false , nil ,
541
539
false , true , "" , "" , storageclass , storageclass .Name )
542
- defer func () {
543
- fss .DeleteAllStatefulSets (ctx , client , namespace )
544
- }()
545
540
546
541
ginkgo .By ("Verify svc pv affinity, pvc annotation and pod node affinity" )
547
542
err = verifyPvcAnnotationPvAffinityPodAnnotationInSvc (ctx , client , statefulset , nil , dep , namespace ,
@@ -569,46 +564,19 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
569
564
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
570
565
571
566
ginkgo .By ("Create a dynamic volume snapshot" )
572
- volumeSnapshot , snapshotContent , snapshotCreated ,
573
- snapshotContentCreated , snapshotId , _ , err := createDynamicVolumeSnapshot (ctx , namespace , snapc ,
567
+ volumeSnapshot , _ , _ ,
568
+ _ , snapshotId , _ , err := createDynamicVolumeSnapshot (ctx , namespace , snapc ,
574
569
volumeSnapshotClass , pvclaim , volHandle , diskSize , true )
575
570
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
571
593
572
ginkgo .By ("Mark zone-2 for removal from wcp namespace" )
594
573
err = markZoneForRemovalFromWcpNs (vcRestSessionId , namespace ,
595
574
topologyAffinityDetails [topologyCategories [0 ]][1 ]) // this will fetch zone-2
596
575
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
597
576
598
577
ginkgo .By ("Restore a volume snapshot" )
599
- pvclaim2 , pvs2 , pod2 := verifyVolumeRestoreOperation (ctx , client , namespace , storageclass ,
578
+ _ , _ , pod2 := verifyVolumeRestoreOperation (ctx , client , namespace , storageclass ,
600
579
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
580
613
581
ginkgo .By ("Perform scaling operation on statefulset. Increase the replica count to 9 when zone is marked" +
614
582
" for removal" )
@@ -622,7 +590,7 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
622
590
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
623
591
624
592
ginkgo .By ("Delete dynamic volume snapshot" )
625
- snapshotCreated , snapshotContentCreated , err = deleteVolumeSnapshot (ctx , snapc , namespace ,
593
+ _ , _ , err = deleteVolumeSnapshot (ctx , snapc , namespace ,
626
594
volumeSnapshot , pandoraSyncWaitTime , volHandle , snapshotId , true )
627
595
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
628
596
})
@@ -665,6 +633,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
665
633
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
666
634
}()
667
635
636
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
637
+ time .Sleep (2 * time .Minute )
638
+
668
639
ginkgo .By ("Read shared storage policy tagged to wcp namespace" )
669
640
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , sharedStoragePolicyName , metav1.GetOptions {})
670
641
if ! apierrors .IsNotFound (err ) {
@@ -737,6 +708,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
737
708
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
738
709
}()
739
710
711
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
712
+ time .Sleep (2 * time .Minute )
713
+
740
714
ginkgo .By ("Read shared storage policy tagged to wcp namespace" )
741
715
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , sharedStoragePolicyName , metav1.GetOptions {})
742
716
if ! apierrors .IsNotFound (err ) {
@@ -854,6 +828,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
854
828
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
855
829
}()
856
830
831
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
832
+ time .Sleep (2 * time .Minute )
833
+
857
834
ginkgo .By ("Read zonal storage policy of zone3" )
858
835
storageclass , err := client .StorageV1 ().StorageClasses ().Get (ctx , zonalStoragePolicyZone3 , metav1.GetOptions {})
859
836
if ! apierrors .IsNotFound (err ) {
@@ -930,6 +907,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
930
907
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
931
908
}()
932
909
910
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
911
+ time .Sleep (2 * time .Minute )
912
+
933
913
ginkgo .By ("Fetch storage class tagged to wcp namespace" )
934
914
storageClassNames := []string {sharedStoragePolicyName , storagePolicyNameZ1 , storagePolicyNameZ2 }
935
915
storageClasses := make ([]* storagev1.StorageClass , len (storageClassNames ))
@@ -1153,6 +1133,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
1153
1133
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
1154
1134
}()
1155
1135
1136
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
1137
+ time .Sleep (2 * time .Minute )
1138
+
1156
1139
storageClassNames := []string {storagePolicyNameZ1 , sharedStoragePolicyName }
1157
1140
storageClasses := make ([]* storagev1.StorageClass , len (storageClassNames ))
1158
1141
for i , name := range storageClassNames {
@@ -1307,6 +1290,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
1307
1290
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
1308
1291
}()
1309
1292
1293
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
1294
+ time .Sleep (2 * time .Minute )
1295
+
1310
1296
// Create PVCs
1311
1297
ginkgo .By ("Create 2 PVCs with different binding modes" )
1312
1298
storageClassList := []* storagev1.StorageClass {zonalStorageClass , sharedStorageClass }
@@ -1339,7 +1325,6 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
1339
1325
deployments := []* appsv1.Deployment {}
1340
1326
depSpecs := [][]* v1.PersistentVolumeClaim {
1341
1327
{pvcList [0 ], pvcList [1 ]},
1342
- {pvcList [2 ]},
1343
1328
}
1344
1329
for _ , pvcSet := range depSpecs {
1345
1330
dep , err := createDeployment (ctx , client , 1 , labelsMap , nil , namespace ,
@@ -1524,6 +1509,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
1524
1509
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
1525
1510
}()
1526
1511
1512
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
1513
+ time .Sleep (2 * time .Minute )
1514
+
1527
1515
ginkgo .By ("Create static volume" )
1528
1516
_ , _ , staticPvc , staticPv , err := createStaticVolumeOnSvc (ctx , client ,
1529
1517
namespace , storageDatastoreUrlZone2 , storagePolicyName )
@@ -1645,6 +1633,9 @@ var _ bool = ginkgo.Describe("[domain-isolation] Management-Workload-Domain-Isol
1645
1633
gomega .Expect (waitForNamespaceToGetDeleted (ctx , client , namespace , poll , pollTimeout )).To (gomega .Succeed ())
1646
1634
}()
1647
1635
1636
+ ginkgo .By ("Wait for namespace to get listed under supervisor cluster" )
1637
+ time .Sleep (2 * time .Minute )
1638
+
1648
1639
ginkgo .By ("Read zonal class" )
1649
1640
storageclassImm , err := client .StorageV1 ().StorageClasses ().Get (ctx , zonalPolicy , metav1.GetOptions {})
1650
1641
if ! apierrors .IsNotFound (err ) {
0 commit comments