]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: check old_max_mds is not wiped by marked down twice 21536/head
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 19 Apr 2018 18:57:45 +0000 (11:57 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 19 Apr 2018 18:57:45 +0000 (11:57 -0700)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/test_failover.py

index 2800f97911a9d6df848c1887a7f1b15a59bd0ddf..97f848ba1b970386e5c13ad9ca387e35de36a04e 100644 (file)
@@ -88,18 +88,32 @@ class TestClusterResize(CephFSTestCase):
         self.shrink(2)
         self.wait_for_health_clear(30)
 
+    def test_down_twice(self):
+        """
+        That marking a FS down twice does not wipe old_max_mds.
+        """
+
+        self.grow(2)
+        self.fs.set_down()
+        self.wait_for_health("MDS_ALL_DOWN", 30)
+        self.fs.set_down(False)
+        mdsmap = self.fs.get_mds_map()
+        self.assertTrue(mdsmap["max_mds"] == 2)
+        self.fs.wait_for_daemons(timeout=60)
+
     def test_all_down(self):
         """
-        That a health error is generated when FS has no active MDS.
+        That a health error is generated when FS has no active MDS and cleared
+        when actives come back online.
         """
 
         self.fs.set_down()
         self.wait_for_health("MDS_ALL_DOWN", 30)
         self.fs.set_down(False)
         self.wait_for_health_clear(30)
-        self.fs.set_down()
+        self.fs.set_down(True)
         self.wait_for_health("MDS_ALL_DOWN", 30)
-        self.grow(1)
+        self.grow(2)
         self.wait_for_health_clear(30)
 
     def test_hole(self):