Skip to content

Commit e6c74ce

Browse files
committed
Disable UHP E2E by default
1 parent f8f8d95 commit e6c74ce

File tree

5 files changed

+33
-9
lines changed

5 files changed

+33
-9
lines changed

hack/existing-standalone-cluster-env-template.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,8 @@ export MNT_TARGET_SUBNET_ID=""
7575
export MNT_TARGET_COMPARTMENT_ID=""
7676

7777
export STATIC_SNAPSHOT_COMPARTMENT_ID=""
78-
export CREATE_UHP_NODEPOOL="false"
78+
79+
# Whether to run UHP E2Es or not, requires Volume Management Plugin enabled on the node and 16+ cores
80+
# Check the following doc for the exact requirements:
81+
# https://docs.oracle.com/en-us/iaas/Content/Block/Concepts/blockvolumeperformance.htm#shapes_block_details
82+
export RUN_UHP_E2E="false"

hack/run_e2e_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ check-env "FSS_VOLUME_HANDLE" $FSS_VOLUME_HANDLE
3030
check-env "MNT_TARGET_ID" $MNT_TARGET_ID
3131
check-env "MNT_TARGET_SUBNET_ID" $MNT_TARGET_SUBNET_ID
3232
check-env "MNT_TARGET_COMPARTMENT_ID" $MNT_TARGET_COMPARTMENT_ID
33-
check-env "CREATE_UHP_NODEPOOL" $CREATE_UHP_NODEPOOL
33+
check-env "RUN_UHP_E2E" $RUN_UHP_E2E
3434

3535

3636
function set_image_pull_repo_and_delete_namespace_flag () {
@@ -59,7 +59,7 @@ function run_e2e_tests_existing_cluster() {
5959
--architecture=${ARCHITECTURE} \
6060
--volume-handle=${FSS_VOLUME_HANDLE} \
6161
--static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \
62-
--create-uhp-nodepool=${CREATE_UHP_NODEPOOL}
62+
--run-uhp-e2e=${RUN_UHP_E2E}
6363
retval=$?
6464
return $retval
6565
}

test/e2e/cloud-provider-oci/csi_volume_creation.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() {
375375
f := framework.NewBackupFramework("csi-uhp")
376376
Context("[cloudprovider][storage][csi][uhp]", func() {
377377
It("Create ISCSI CSI block volume with UHP Performance Level", func() {
378+
checkUhpPrerequisites(f)
378379
compartmentId := f.GetCompartmentId(*setupF)
379380
if compartmentId == "" {
380381
framework.Failf("Compartment Id undefined.")
@@ -395,6 +396,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() {
395396
_ = f.DeleteStorageClass(framework.ClassOCIUHP)
396397
})
397398
It("Create Paravirtualized CSI block volume with UHP Performance Level", func() {
399+
checkUhpPrerequisites(f)
398400
compartmentId := f.GetCompartmentId(*setupF)
399401
if compartmentId == "" {
400402
framework.Failf("Compartment Id undefined.")
@@ -415,6 +417,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() {
415417
_ = f.DeleteStorageClass(framework.ClassOCIUHP)
416418
})
417419
It("Create CSI block volume with UHP Performance Level and xfs file system", func() {
420+
checkUhpPrerequisites(f)
418421
compartmentId := f.GetCompartmentId(*setupF)
419422
if compartmentId == "" {
420423
framework.Failf("Compartment Id undefined.")
@@ -435,6 +438,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() {
435438
_ = f.DeleteStorageClass(framework.ClassOCIUHP)
436439
})
437440
It("Static Provisioning CSI UHP", func() {
441+
checkUhpPrerequisites(f)
438442
compartmentId := f.GetCompartmentId(*setupF)
439443
if compartmentId == "" {
440444
framework.Failf("Compartment Id undefined.")
@@ -457,6 +461,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() {
457461
f.VolumeIds = append(f.VolumeIds, volumeId)
458462
})
459463
It("Basic Pod Delete UHP", func() {
464+
checkUhpPrerequisites(f)
460465
compartmentId := f.GetCompartmentId(*setupF)
461466
if compartmentId == "" {
462467
framework.Failf("Compartment Id undefined.")
@@ -490,6 +495,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() {
490495
_ = f.DeleteStorageClass(framework.ClassOCIUHP)
491496
})
492497
It("Create UHP PVC and POD for CSI with CMEK and in-transit encryption", func() {
498+
checkUhpPrerequisites(f)
493499
compartmentId := f.GetCompartmentId(*setupF)
494500
if compartmentId == "" {
495501
framework.Failf("Compartment Id undefined.")
@@ -513,6 +519,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() {
513519
_ = f.DeleteStorageClass(framework.ClassOCIKMS)
514520
})
515521
It("Create UHP and lower performance block volumes on same node", func() {
522+
checkUhpPrerequisites(f)
516523
sc1params := map[string]string{
517524
framework.AttachmentType: framework.AttachmentTypeISCSI,
518525
csi_util.VpusPerGB: "30",
@@ -523,6 +530,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() {
523530
testTwoPVCSetup(f, sc1params, sc2params)
524531
})
525532
It("Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for iSCSI UHP volume", func() {
533+
checkUhpPrerequisites(f)
526534
var size = "100Gi"
527535
pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-pvc-expand-to-100gi-iscsi-uhp")
528536

@@ -547,6 +555,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() {
547555
_ = f.DeleteStorageClass(framework.ClassOCIUHP)
548556
})
549557
It("Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for Paravirtualized UHP volume", func() {
558+
checkUhpPrerequisites(f)
550559
var size = "100Gi"
551560
pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-pvc-expand-to-100gi-iscsi-uhp")
552561

@@ -577,6 +586,7 @@ var _ = Describe("CSI UHP Volumes addition e2es", func() {
577586
f := framework.NewBackupFramework("csi-uhp-additional")
578587
Context("[uhp]", func() {
579588
It("Create UHP paravirtual volume and lower performance ISCSI block volumes on same node", func() {
589+
checkUhpPrerequisites(f)
580590
sc1params := map[string]string{
581591
framework.AttachmentType: framework.AttachmentTypeParavirtualized,
582592
csi_util.VpusPerGB: "30",
@@ -587,6 +597,7 @@ var _ = Describe("CSI UHP Volumes addition e2es", func() {
587597
testTwoPVCSetup(f, sc1params, sc2params)
588598
})
589599
It("Create UHP ISCSI volume and lower performance paravirtualized block volumes on same node", func() {
600+
checkUhpPrerequisites(f)
590601
sc1params := map[string]string{
591602
framework.AttachmentType: framework.AttachmentTypeISCSI,
592603
csi_util.VpusPerGB: "30",
@@ -597,6 +608,7 @@ var _ = Describe("CSI UHP Volumes addition e2es", func() {
597608
testTwoPVCSetup(f, sc1params, sc2params)
598609
})
599610
It("Create two UHP ISCSI block volumes on same node", func() {
611+
checkUhpPrerequisites(f)
600612
sc1params := map[string]string{
601613
framework.AttachmentType: framework.AttachmentTypeISCSI,
602614
csi_util.VpusPerGB: "30",
@@ -796,3 +808,9 @@ func testTwoPVCSetup(f *framework.CloudProviderFramework, storageclass1params ma
796808
_ = f.DeleteStorageClass("storage-class-one")
797809
_ = f.DeleteStorageClass("storage-class-two")
798810
}
811+
812+
func checkUhpPrerequisites(f *framework.CloudProviderFramework) {
813+
if !f.RunUhpE2E {
814+
Skip("Skipping test since RUN_UHP_E2E environment variable is set to \"false\"")
815+
}
816+
}

test/e2e/framework/cloud_provider_framework.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ type CloudProviderFramework struct {
8787

8888
// Backend Nsg ocids test
8989
BackendNsgOcids string
90+
RunUhpE2E bool
9091
}
9192

9293
// NewDefaultFramework constructs a new e2e test CloudProviderFramework with default options.
@@ -127,6 +128,7 @@ func NewCcmFramework(baseName string, client clientset.Interface, backup bool) *
127128
if backendNsgIds != "" {
128129
f.BackendNsgOcids = backendNsgIds
129130
}
131+
f.RunUhpE2E = runUhpE2E
130132
BeforeEach(f.BeforeEach)
131133
AfterEach(f.AfterEach)
132134

test/e2e/framework/framework.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ var (
8888
architecture string
8989
volumeHandle string // The FSS mount volume handle
9090
staticSnapshotCompartmentOCID string // Compartment ID for cross compartment snapshot test
91-
createUhpNodepool bool // Creates UHP nodepool instead of normal nodepool
91+
runUhpE2E bool // Whether to run UHP E2Es, requires Volume Management Plugin enabled on the node and 16+ cores (check blockvolumeperformance public doc for the exact requirements)
9292
)
9393

9494
func init() {
@@ -118,7 +118,7 @@ func init() {
118118
flag.StringVar(&architecture, "architecture", "", "CPU architecture to be used for testing.")
119119

120120
flag.StringVar(&staticSnapshotCompartmentOCID, "static-snapshot-compartment-id", "", "Compartment ID for cross compartment snapshot test")
121-
flag.BoolVar(&createUhpNodepool, "create-uhp-nodepool", false, "Run UHP E2Es as well")
121+
flag.BoolVar(&runUhpE2E, "run-uhp-e2e", false, "Run UHP E2Es as well")
122122
}
123123

124124
// Framework is the context of the text execution.
@@ -151,7 +151,7 @@ type Framework struct {
151151

152152
// Compartment ID for cross compartment snapshot test
153153
StaticSnapshotCompartmentOcid string
154-
CreateUhpNodepool bool
154+
RunUhpE2E bool
155155
}
156156

157157
// New creates a new a framework that holds the context of the test
@@ -175,7 +175,7 @@ func NewWithConfig() *Framework {
175175
ReservedIP: reservedIP,
176176
VolumeHandle: volumeHandle,
177177
StaticSnapshotCompartmentOcid: staticSnapshotCompartmentOCID,
178-
CreateUhpNodepool: createUhpNodepool,
178+
RunUhpE2E: runUhpE2E,
179179
}
180180

181181
f.CloudConfigPath = cloudConfigFile
@@ -210,8 +210,8 @@ func (f *Framework) Initialize() {
210210
Logf("FSS Volume Handle is : %s", f.VolumeHandle)
211211
f.StaticSnapshotCompartmentOcid = staticSnapshotCompartmentOCID
212212
Logf("Static Snapshot Compartment OCID: %s", f.StaticSnapshotCompartmentOcid)
213-
f.CreateUhpNodepool = createUhpNodepool
214-
Logf("Create Uhp Nodepool: %v", f.CreateUhpNodepool)
213+
f.RunUhpE2E = runUhpE2E
214+
Logf("Run Uhp E2Es as well: %v", f.RunUhpE2E)
215215
f.CMEKKMSKey = cmekKMSKey
216216
Logf("CMEK KMS Key: %s", f.CMEKKMSKey)
217217
f.NsgOCIDS = nsgOCIDS

0 commit comments

Comments
 (0)