From 15e2abed8e9dbf646029150b06e64ee446d9663a Mon Sep 17 00:00:00 2001 From: Elena German Date: Mon, 19 Aug 2024 20:16:40 -0400 Subject: [PATCH 1/2] vCore: increase loki and odf timeouts --- .../internal/vcorecommon/loki-operator.go | 21 +++++++++++-------- .../vcore/internal/vcorecommon/odf.go | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/tests/system-tests/vcore/internal/vcorecommon/loki-operator.go b/tests/system-tests/vcore/internal/vcorecommon/loki-operator.go index cba34fd7c..1b3fa611a 100644 --- a/tests/system-tests/vcore/internal/vcorecommon/loki-operator.go +++ b/tests/system-tests/vcore/internal/vcorecommon/loki-operator.go @@ -34,22 +34,22 @@ func VerifyLokiSuite() { "LokiStack and Cluster Logging validation", Label(vcoreparams.LabelVCoreODF), func() { It(fmt.Sprintf("Verifies %s namespace exists", vcoreparams.CLONamespace), - Label("loki"), VerifyCLONamespaceExists) + Label("loki2"), VerifyCLONamespaceExists) It(fmt.Sprintf("Verifies %s namespace exists", vcoreparams.LokiNamespace), - Label("loki"), VerifyLokiNamespaceExists) + Label("loki2"), VerifyLokiNamespaceExists) It("Verify Loki Operator successfully installed", - Label("loki"), reportxml.ID("74913"), VerifyLokiDeployment) + Label("loki2"), reportxml.ID("74913"), VerifyLokiDeployment) It("Verify ClusterLogging Operator successfully installed", - Label("loki"), reportxml.ID("73678"), VerifyCLODeployment) + Label("loki2"), reportxml.ID("73678"), VerifyCLODeployment) It("Create ObjectBucketClaim config", - Label("loki"), reportxml.ID("74914"), CreateObjectBucketClaim) + Label("loki2"), reportxml.ID("74914"), CreateObjectBucketClaim) It("Create LokiStack instance", - Label("loki"), reportxml.ID("74915"), CreateLokiStackInstance) + Label("loki2"), reportxml.ID("74915"), CreateLokiStackInstance) It(fmt.Sprintf("Verify Cluster Logging instance %s is running in namespace %s", vcoreparams.CLOInstanceName, vcoreparams.CLONamespace), @@ -114,7 +114,7 @@ func CreateObjectBucketClaim(ctx SpecContext) { _, err = objectBucketClaimObj. WithGenerateBucketName(vcoreparams.ObjectBucketClaimName). - WithStorageClassName("ocs-storagecluster-ceph-rgw").Create() + WithStorageClassName("openshift-storage.noobaa.io").Create() Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to create objectBucketClaim %s in namespace %s due to %v", vcoreparams.ObjectBucketClaimName, vcoreparams.CLONamespace, err)) @@ -152,6 +152,8 @@ func CreateObjectBucketClaim(ctx SpecContext) { func CreateLokiStackInstance(ctx SpecContext) { glog.V(vcoreparams.VCoreLogLevel).Infof("Create a LokiStack instance") + time.Sleep(2 * time.Minute) + var err error lokiSecretObj := secret.NewBuilder(APIClient, @@ -277,7 +279,8 @@ func CreateLokiStackInstance(ctx SpecContext) { Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to create lokiStack instance %s in namespace %s due to %v", vcoreparams.LokiStackName, vcoreparams.CLONamespace, err)) - Expect(lokiStackObj.IsReady(10*time.Minute)).To(Equal(true), + + Expect(lokiStackObj.IsReady(15*time.Minute)).To(Equal(true), fmt.Sprintf("lokiStack instance %s in namespace %s failed to reach Ready state after 10 mins", vcoreparams.LokiStackName, vcoreparams.CLONamespace)) } // func CreateLokiStackInstance (ctx SpecContext) @@ -383,7 +386,7 @@ func CreateCLOInstance(ctx SpecContext) { glog.V(90).Infof("Verify clusterlogging %s in namespace %s state is Ready", vcoreparams.CLOInstanceName, vcoreparams.CLONamespace) - Expect(clusterLoggingObj.IsReady(time.Minute)).To(Equal(true), + Expect(clusterLoggingObj.IsReady(5*time.Minute)).To(Equal(true), fmt.Sprintf("clusterlogging %s in namespace %s is Degraded", vcoreparams.CLOInstanceName, vcoreparams.CLONamespace)) } // func CreateCLOInstance (ctx SpecContext) diff --git a/tests/system-tests/vcore/internal/vcorecommon/odf.go b/tests/system-tests/vcore/internal/vcorecommon/odf.go index aa3854b85..7d91f8302 100644 --- a/tests/system-tests/vcore/internal/vcorecommon/odf.go +++ b/tests/system-tests/vcore/internal/vcorecommon/odf.go @@ -126,7 +126,7 @@ func VerifyODFConsoleConfig(ctx SpecContext) { odfConsolePlugin, newPluginsList)) glog.V(vcoreparams.VCoreLogLevel).Infof("Wait for the console enablement") - time.Sleep(5 * time.Minute) + time.Sleep(3 * time.Minute) } // func VerifyODFConsoleConfig (ctx SpecContext) // VerifyODFTaints asserts ODF nodes taints configuration. From 507df63b396e85e69fbfd165b8e1a6d73451f656 Mon Sep 17 00:00:00 2001 From: Elena German Date: Mon, 19 Aug 2024 20:30:15 -0400 Subject: [PATCH 2/2] remove LVS from the redis deployment stage --- .../config-files/redis-custom-values.yaml | 4 +- .../internal/vcorecommon/loki-operator.go | 13 +++-- .../vcore/internal/vcorecommon/redis.go | 48 ------------------- 3 files changed, 8 insertions(+), 57 deletions(-) diff --git a/tests/system-tests/vcore/internal/config-files/redis-custom-values.yaml b/tests/system-tests/vcore/internal/config-files/redis-custom-values.yaml index 1c83eb3da..24840c507 100644 --- a/tests/system-tests/vcore/internal/config-files/redis-custom-values.yaml +++ b/tests/system-tests/vcore/internal/config-files/redis-custom-values.yaml @@ -47,7 +47,7 @@ persistentVolume: tolerations: - effect: NoSchedule - key: node-role.kubernetes.io/master + key: node-role.kubernetes.io/infra operator: Exists additionalAffinities: @@ -55,7 +55,7 @@ additionalAffinities: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: node-role.kubernetes.io/master + - key: node-role.kubernetes.io/infra operator: Exists securityContext: diff --git a/tests/system-tests/vcore/internal/vcorecommon/loki-operator.go b/tests/system-tests/vcore/internal/vcorecommon/loki-operator.go index 1b3fa611a..5c1808458 100644 --- a/tests/system-tests/vcore/internal/vcorecommon/loki-operator.go +++ b/tests/system-tests/vcore/internal/vcorecommon/loki-operator.go @@ -34,22 +34,22 @@ func VerifyLokiSuite() { "LokiStack and Cluster Logging validation", Label(vcoreparams.LabelVCoreODF), func() { It(fmt.Sprintf("Verifies %s namespace exists", vcoreparams.CLONamespace), - Label("loki2"), VerifyCLONamespaceExists) + Label("loki"), VerifyCLONamespaceExists) It(fmt.Sprintf("Verifies %s namespace exists", vcoreparams.LokiNamespace), - Label("loki2"), VerifyLokiNamespaceExists) + Label("loki"), VerifyLokiNamespaceExists) It("Verify Loki Operator successfully installed", - Label("loki2"), reportxml.ID("74913"), VerifyLokiDeployment) + Label("loki"), reportxml.ID("74913"), VerifyLokiDeployment) It("Verify ClusterLogging Operator successfully installed", - Label("loki2"), reportxml.ID("73678"), VerifyCLODeployment) + Label("loki"), reportxml.ID("73678"), VerifyCLODeployment) It("Create ObjectBucketClaim config", - Label("loki2"), reportxml.ID("74914"), CreateObjectBucketClaim) + Label("loki"), reportxml.ID("74914"), CreateObjectBucketClaim) It("Create LokiStack instance", - Label("loki2"), reportxml.ID("74915"), CreateLokiStackInstance) + Label("loki"), reportxml.ID("74915"), CreateLokiStackInstance) It(fmt.Sprintf("Verify Cluster Logging instance %s is running in namespace %s", vcoreparams.CLOInstanceName, vcoreparams.CLONamespace), @@ -279,7 +279,6 @@ func CreateLokiStackInstance(ctx SpecContext) { Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to create lokiStack instance %s in namespace %s due to %v", vcoreparams.LokiStackName, vcoreparams.CLONamespace, err)) - Expect(lokiStackObj.IsReady(15*time.Minute)).To(Equal(true), fmt.Sprintf("lokiStack instance %s in namespace %s failed to reach Ready state after 10 mins", vcoreparams.LokiStackName, vcoreparams.CLONamespace)) diff --git a/tests/system-tests/vcore/internal/vcorecommon/redis.go b/tests/system-tests/vcore/internal/vcorecommon/redis.go index ff7fc8a42..ba46c2580 100644 --- a/tests/system-tests/vcore/internal/vcorecommon/redis.go +++ b/tests/system-tests/vcore/internal/vcorecommon/redis.go @@ -10,10 +10,6 @@ import ( "k8s.io/apimachinery/pkg/util/wait" - "github.com/openshift-kni/eco-goinfra/pkg/lso" - lsov1 "github.com/openshift/local-storage-operator/api/v1" - lsov1alpha1 "github.com/openshift/local-storage-operator/api/v1alpha1" - "github.com/openshift-kni/eco-gotests/tests/system-tests/internal/remote" "github.com/openshift-kni/eco-goinfra/pkg/reportxml" @@ -41,55 +37,11 @@ func VerifyRedisSuite() { Describe( "Redis validation", Label(vcoreparams.LabelVCoreOperators), func() { - It("Verify redis localvolumeset instance exists", - Label("redis"), VerifyRedisLocalVolumeSet) - It("Verify Redis deployment procedure", Label("redis"), reportxml.ID("59503"), VerifyRedisDeploymentProcedure) }) } -// VerifyRedisLocalVolumeSet asserts redis localvolumeset instance exists. -func VerifyRedisLocalVolumeSet(ctx SpecContext) { - glog.V(vcoreparams.VCoreLogLevel).Infof("Create redis localvolumeset instance %s in namespace %s if not found", - vcoreparams.RedisLocalVolumeSetName, vcoreparams.LSONamespace) - - var err error - - localVolumeSetObj := lso.NewLocalVolumeSetBuilder(APIClient, - vcoreparams.RedisLocalVolumeSetName, - vcoreparams.LSONamespace) - - if localVolumeSetObj.Exists() { - err = localVolumeSetObj.Delete() - Expect(err).ToNot(HaveOccurred(), - fmt.Sprintf("failed to delete localvolumeset %s from namespace %s; %v", - vcoreparams.RedisLocalVolumeSetName, vcoreparams.LSONamespace, err)) - } - - nodeSelector := corev1.NodeSelector{NodeSelectorTerms: []corev1.NodeSelectorTerm{{ - MatchExpressions: []corev1.NodeSelectorRequirement{{ - Key: "kubernetes.io/hostname", - Operator: "In", - Values: []string{"master-0", "master-1", "master-2"}, - }}}, - }} - - deviceInclusionSpec := lsov1alpha1.DeviceInclusionSpec{ - DeviceTypes: []lsov1alpha1.DeviceType{lsov1alpha1.RawDisk}, - DeviceMechanicalProperties: []lsov1alpha1.DeviceMechanicalProperty{lsov1alpha1.NonRotational}, - } - - _, err = localVolumeSetObj.WithNodeSelector(nodeSelector). - WithStorageClassName(vcoreparams.StorageClassName). - WithVolumeMode(lsov1.PersistentVolumeBlock). - WithFSType("ext4"). - WithMaxDeviceCount(int32(10)). - WithDeviceInclusionSpec(deviceInclusionSpec).Create() - Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("failed to create localvolumeset %s in namespace %s "+ - "due to %v", vcoreparams.RedisLocalVolumeSetName, vcoreparams.LSONamespace, err)) -} // func VerifyLocalVolumeSet (ctx SpecContext) - // VerifyRedisDeploymentProcedure asserts Redis deployment procedure. // //nolint:funlen