]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: make memstore dependency declarative
authorJohn Spray <john.spray@redhat.com>
Thu, 23 Jul 2015 09:38:48 +0000 (10:38 +0100)
committerJohn Spray <john.spray@redhat.com>
Fri, 2 Oct 2015 16:41:16 +0000 (17:41 +0100)
...instead of checking for it procedurally during
TestClusterFull.setUp

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/cephfs/cephfs_test_case.py
tasks/cephfs/test_full.py

index 95c31ff142e65367664c3df7b93f1b1c6e86b2b1..6af4dd38d68e9097bb11606af46bce7ca4c169aa 100644 (file)
@@ -37,6 +37,7 @@ class CephFSTestCase(unittest.TestCase):
     MDSS_REQUIRED = 1
     REQUIRE_KCLIENT_REMOTE = False
     REQUIRE_ONE_CLIENT_REMOTE = False
+    REQUIRE_MEMSTORE = False
 
     LOAD_SETTINGS = []
 
@@ -62,6 +63,13 @@ class CephFSTestCase(unittest.TestCase):
             if self.mounts[0].client_remote.hostname in self.fs.get_mds_hostnames():
                 raise case.SkipTest("Require first client to be on separate server from MDSs")
 
+        if self.REQUIRE_MEMSTORE:
+            objectstore = self.fs.get_config("osd_objectstore", "osd")
+            if objectstore != "memstore":
+                # You certainly *could* run this on a real OSD, but you don't want to sit
+                # here for hours waiting for the test to fill up a 1TB drive!
+                raise case.SkipTest("Require `memstore` OSD backend to simulate full drives")
+
         # Unmount all surplus clients
         for i in range(self.CLIENTS_REQUIRED, len(self.mounts)):
             mount = self.mounts[i]
index df9288b031204844679125aef4916a9a8e8f446e..2d2d6ec1594c355ec396c96f4769c8b4e80d4e7e 100644 (file)
@@ -6,7 +6,6 @@ import os
 from textwrap import dedent
 import time
 from teuthology.orchestra.run import CommandFailedError
-from unittest import case
 from tasks.cephfs.cephfs_test_case import CephFSTestCase
 
 
@@ -374,6 +373,7 @@ class TestClusterFull(FullnessTestCase):
     Test cluster-wide fullness, which indicates that an OSD has become too full
     """
     pool_capacity = None
+    REQUIRE_MEMSTORE = True
 
     def setUp(self):
         super(TestClusterFull, self).setUp()
@@ -386,12 +386,6 @@ class TestClusterFull(FullnessTestCase):
             mon_osd_full_ratio = float(self.fs.get_config("mon_osd_full_ratio"))
             TestClusterFull.fill_mb = int(1.05 * mon_osd_full_ratio * (self.pool_capacity / (1024.0 * 1024.0)))
 
-        objectstore = self.fs.get_config("osd_objectstore", "osd")
-        if objectstore != "memstore":
-            # You certainly *could* run this on a real OSD, but you don't want to sit
-            # here for hours waiting for the test to fill up a 1TB drive!
-            raise case.SkipTest("Require `memstore` OSD backend to simulate full drives")
-
     def is_full(self):
         return self.fs.is_full()