From c1362ce482cfd760c4d190af44a19df73bae88df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 1 Mar 2021 14:47:07 +0100 Subject: [PATCH] ceph: revert "ceph: test latest ceph on raw device" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 114a949cfbd39437c91cdfe1dae76df98163fc1a since 14.2.14 is out and has a fix to use raw mode instead of LVM mode on partitions. Signed-off-by: Sébastien Han --- Jenkinsfile | 1 - tests/framework/installer/ceph_installer.go | 27 +++----------------- tests/integration/ceph_flex_test.go | 2 +- tests/integration/ceph_helm_test.go | 2 +- tests/integration/ceph_multi_cluster_test.go | 4 +-- tests/integration/ceph_smoke_test.go | 2 +- tests/integration/ceph_upgrade_test.go | 4 +-- 7 files changed, 11 insertions(+), 31 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ecde9c0f3..bcb305226 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -238,7 +238,6 @@ def RunIntegrationTest(k, v) { STORAGE_PROVIDER_TESTS='''+"${env.testProvider}"+''' \ TEST_ARGUMENTS='''+"${env.testArgs}"+''' \ TEST_IS_OFFICIAL_BUILD='''+"${env.isOfficialBuild}"+''' \ - TEST_OSDS_ON_PARTITIONS="false" \ TEST_SCRATCH_DEVICE=/dev/nvme0n1 kubectl config view _output/tests/linux_amd64/integration -test.v -test.timeout 7200s 2>&1 | tee _output/tests/integrationTests.log''' diff --git a/tests/framework/installer/ceph_installer.go b/tests/framework/installer/ceph_installer.go index efb903c93..94db3c22c 100644 --- a/tests/framework/installer/ceph_installer.go +++ b/tests/framework/installer/ceph_installer.go @@ -42,24 +42,19 @@ import ( const ( // test with the latest nautilus build - nautilusTestImage = "ceph/ceph:v14" - // test with the latest nautilus build. ceph-volume is not allowing OSDs on partitions on v14.2.13 and newer. - nautilusTestImageOnPartitions = "ceph/ceph:v14.2.12" + nautilusTestImage = "ceph/ceph:v14.2.12" // test with the latest octopus build octopusTestImage = "ceph/ceph:v15" - // test with the latest octopus build. - octopusTestImageOnPartitions = "ceph/ceph:v15.2.9" // test with the latest master image masterTestImage = "ceph/daemon-base:latest-master-devel" cephOperatorLabel = "app=rook-ceph-operator" defaultclusterName = "test-cluster" - // if false, expect to create OSDs on raw devices, - // otherwise use a version of ceph that is compatible with OSDs on partitions - usePartitionEnvVar = "TEST_OSDS_ON_PARTITIONS" ) var ( - MasterVersion = cephv1.CephVersionSpec{Image: masterTestImage, AllowUnsupported: true} + NautilusVersion = cephv1.CephVersionSpec{Image: nautilusTestImage} + OctopusVersion = cephv1.CephVersionSpec{Image: octopusTestImage} + MasterVersion = cephv1.CephVersionSpec{Image: masterTestImage, AllowUnsupported: true} ) // CephInstaller wraps installing and uninstalling rook on a platform @@ -77,20 +72,6 @@ type CephInstaller struct { cleanupHost bool } -func NautilusVersion() cephv1.CephVersionSpec { - if os.Getenv(usePartitionEnvVar) == "false" { - return cephv1.CephVersionSpec{Image: nautilusTestImage} - } - return cephv1.CephVersionSpec{Image: nautilusTestImageOnPartitions} -} - -func OctopusVersion() cephv1.CephVersionSpec { - if os.Getenv(usePartitionEnvVar) == "false" { - return cephv1.CephVersionSpec{Image: octopusTestImage} - } - return cephv1.CephVersionSpec{Image: octopusTestImageOnPartitions} -} - // CreateCephOperator creates rook-operator via kubectl func (h *CephInstaller) CreateCephOperator(namespace string) (err error) { logger.Infof("Starting Rook Operator") diff --git a/tests/integration/ceph_flex_test.go b/tests/integration/ceph_flex_test.go index a90e6c4a3..e00618e70 100644 --- a/tests/integration/ceph_flex_test.go +++ b/tests/integration/ceph_flex_test.go @@ -96,7 +96,7 @@ func (s *CephFlexDriverSuite) SetupSuite() { skipOSDCreation: false, minimalMatrixK8sVersion: flexDriverMinimalTestVersion, rookVersion: installer.VersionMaster, - cephVersion: installer.OctopusVersion(), + cephVersion: installer.OctopusVersion, } s.clusterInfo = client.AdminClusterInfo(s.namespace) diff --git a/tests/integration/ceph_helm_test.go b/tests/integration/ceph_helm_test.go index 95305a5e8..a50420cdb 100644 --- a/tests/integration/ceph_helm_test.go +++ b/tests/integration/ceph_helm_test.go @@ -74,7 +74,7 @@ func (hs *HelmSuite) SetupSuite() { skipOSDCreation: false, minimalMatrixK8sVersion: helmMinimalTestVersion, rookVersion: installer.VersionMaster, - cephVersion: installer.NautilusVersion(), + cephVersion: installer.NautilusVersion, } hs.op, hs.kh = StartTestCluster(hs.T, &helmTestCluster) diff --git a/tests/integration/ceph_multi_cluster_test.go b/tests/integration/ceph_multi_cluster_test.go index 8a45cc66f..d1f6373c5 100644 --- a/tests/integration/ceph_multi_cluster_test.go +++ b/tests/integration/ceph_multi_cluster_test.go @@ -142,7 +142,7 @@ func NewMCTestOperations(t func() *testing.T, namespace1 string, namespace2 stri checkIfShouldRunForMinimalTestMatrix(t, kh, multiClusterMinimalTestVersion) cleanupHost := false - i := installer.NewCephInstaller(t, kh.Clientset, false, "", installer.VersionMaster, installer.NautilusVersion(), cleanupHost) + i := installer.NewCephInstaller(t, kh.Clientset, false, "", installer.VersionMaster, installer.NautilusVersion, cleanupHost) op := &MCTestOperations{i, kh, t, namespace1, namespace2, installer.SystemNamespace(namespace1), "", false} if kh.VersionAtLeast("v1.13.0") { @@ -199,7 +199,7 @@ func (o MCTestOperations) Teardown() { func (o MCTestOperations) startCluster(namespace, store string) error { logger.Infof("starting cluster %s", namespace) err := o.installer.CreateRookCluster(namespace, o.systemNamespace, store, o.testOverPVC, o.storageClassName, - cephv1.MonSpec{Count: 1, AllowMultiplePerNode: true}, true, false, false, installer.NautilusVersion()) + cephv1.MonSpec{Count: 1, AllowMultiplePerNode: true}, true, false, false, installer.NautilusVersion) if err != nil { o.T().Fail() o.installer.GatherAllRookLogs(o.T().Name(), namespace, o.systemNamespace) diff --git a/tests/integration/ceph_smoke_test.go b/tests/integration/ceph_smoke_test.go index 58d4911e6..fa6981343 100644 --- a/tests/integration/ceph_smoke_test.go +++ b/tests/integration/ceph_smoke_test.go @@ -99,7 +99,7 @@ func (suite *SmokeSuite) SetupSuite() { skipOSDCreation: false, minimalMatrixK8sVersion: smokeSuiteMinimalTestVersion, rookVersion: installer.VersionMaster, - cephVersion: installer.OctopusVersion(), + cephVersion: installer.OctopusVersion, } suite.op, suite.k8sh = StartTestCluster(suite.T, &smokeTestCluster) diff --git a/tests/integration/ceph_upgrade_test.go b/tests/integration/ceph_upgrade_test.go index e2d8515ea..d85d91959 100644 --- a/tests/integration/ceph_upgrade_test.go +++ b/tests/integration/ceph_upgrade_test.go @@ -86,7 +86,7 @@ func (s *UpgradeSuite) SetupSuite() { skipOSDCreation: false, minimalMatrixK8sVersion: upgradeMinimalTestVersion, rookVersion: installer.Version1_4, - cephVersion: installer.NautilusVersion(), + cephVersion: installer.NautilusVersion, } s.op, s.k8sh = StartTestCluster(s.T, &upgradeTestCluster) @@ -200,7 +200,7 @@ func (s *UpgradeSuite) TestUpgradeToMaster() { // logger.Infof("*** UPGRADING CEPH FROM Nautilus TO Octopus ***") s.gatherLogs(systemNamespace, "_before_octopus_upgrade") - s.upgradeCephVersion(installer.OctopusVersion().Image, numOSDs) + s.upgradeCephVersion(installer.OctopusVersion.Image, numOSDs) // Verify reading and writing to the test clients newFile = "post-octopus-upgrade-file" s.verifyFilesAfterUpgrade(filesystemName, newFile, message, rbdFilesToRead, cephfsFilesToRead)