From: Patrick Donnelly Date: Thu, 19 Apr 2018 18:57:45 +0000 (-0700) Subject: qa: check old_max_mds is not wiped by marked down twice X-Git-Tag: v13.1.0~138^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=378a6fcfe877dd5fe3799f368ac541b2ced8ce4a;p=ceph.git qa: check old_max_mds is not wiped by marked down twice Signed-off-by: Patrick Donnelly --- diff --git a/qa/tasks/cephfs/test_failover.py b/qa/tasks/cephfs/test_failover.py index 2800f97911a9..97f848ba1b97 100644 --- a/qa/tasks/cephfs/test_failover.py +++ b/qa/tasks/cephfs/test_failover.py @@ -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):