@@ -38,7 +38,6 @@ import (
38
38
"k8s.io/apimachinery/pkg/runtime/schema"
39
39
"k8s.io/apimachinery/pkg/types"
40
40
"k8s.io/apimachinery/pkg/util/rand"
41
- "k8s.io/apimachinery/pkg/util/sets"
42
41
"k8s.io/apimachinery/pkg/util/wait"
43
42
"k8s.io/apiserver/pkg/authentication/serviceaccount"
44
43
clientset "k8s.io/client-go/kubernetes"
@@ -418,66 +417,6 @@ var _ = utils.SIGDescribe("Dynamic Provisioning", func() {
418
417
framework .ExpectNoError (e2epv .WaitForPersistentVolumeDeleted (c , pv .Name , 1 * time .Second , 30 * time .Second ))
419
418
})
420
419
421
- ginkgo .It ("should not provision a volume in an unmanaged GCE zone." , func () {
422
- e2eskipper .SkipUnlessProviderIs ("gce" , "gke" )
423
-
424
- ginkgo .By ("Discovering an unmanaged zone" )
425
- allZones := sets .NewString () // all zones in the project
426
-
427
- gceCloud , err := gce .GetGCECloud ()
428
- framework .ExpectNoError (err )
429
-
430
- // Get all k8s managed zones (same as zones with nodes in them for test)
431
- managedZones , err := gceCloud .GetAllZonesFromCloudProvider ()
432
- framework .ExpectNoError (err )
433
-
434
- // Get a list of all zones in the project
435
- zones , err := gceCloud .ComputeServices ().GA .Zones .List (framework .TestContext .CloudConfig .ProjectID ).Do ()
436
- framework .ExpectNoError (err )
437
- for _ , z := range zones .Items {
438
- allZones .Insert (z .Name )
439
- }
440
-
441
- // Get the subset of zones not managed by k8s
442
- var unmanagedZone string
443
- var popped bool
444
- unmanagedZones := allZones .Difference (managedZones )
445
- // And select one of them at random.
446
- if unmanagedZone , popped = unmanagedZones .PopAny (); ! popped {
447
- e2eskipper .Skipf ("No unmanaged zones found." )
448
- }
449
-
450
- ginkgo .By ("Creating a StorageClass for the unmanaged zone" )
451
- test := testsuites.StorageClassTest {
452
- Name : "unmanaged_zone" ,
453
- Provisioner : "kubernetes.io/gce-pd" ,
454
- Timeouts : f .Timeouts ,
455
- Parameters : map [string ]string {"zone" : unmanagedZone },
456
- ClaimSize : "1Gi" ,
457
- }
458
- sc := newStorageClass (test , ns , "unmanaged" )
459
- sc , err = c .StorageV1 ().StorageClasses ().Create (context .TODO (), sc , metav1.CreateOptions {})
460
- framework .ExpectNoError (err )
461
- defer deleteStorageClass (c , sc .Name )
462
-
463
- ginkgo .By ("Creating a claim and expecting it to timeout" )
464
- pvc := e2epv .MakePersistentVolumeClaim (e2epv.PersistentVolumeClaimConfig {
465
- ClaimSize : test .ClaimSize ,
466
- StorageClassName : & sc .Name ,
467
- VolumeMode : & test .VolumeMode ,
468
- }, ns )
469
- pvc , err = c .CoreV1 ().PersistentVolumeClaims (ns ).Create (context .TODO (), pvc , metav1.CreateOptions {})
470
- framework .ExpectNoError (err )
471
- defer func () {
472
- framework .ExpectNoError (e2epv .DeletePersistentVolumeClaim (c , pvc .Name , ns ), "Failed to delete PVC " , pvc .Name )
473
- }()
474
-
475
- // The claim should timeout phase:Pending
476
- err = e2epv .WaitForPersistentVolumeClaimPhase (v1 .ClaimBound , c , ns , pvc .Name , 2 * time .Second , timeouts .ClaimProvisionShort )
477
- framework .ExpectError (err )
478
- framework .Logf (err .Error ())
479
- })
480
-
481
420
ginkgo .It ("should test that deleting a claim before the volume is provisioned deletes the volume." , func () {
482
421
// This case tests for the regressions of a bug fixed by PR #21268
483
422
// REGRESSION: Deleting the PVC before the PV is provisioned can result in the PV
0 commit comments