mirror of
https://github.com/ceph/ceph
synced 2024-12-16 16:39:21 +00:00
tasks/cephfs: test health messages from readonly stat
Signed-off-by: John Spray <john.spray@redhat.com>
This commit is contained in:
parent
9b7aab0ed7
commit
ac383735ae
@ -399,3 +399,13 @@ class CephFSTestCase(unittest.TestCase):
|
||||
raise RuntimeError("Unexpected health messages: {0}".format(summary_strings))
|
||||
|
||||
self.wait_until_true(seen_health_warning, timeout)
|
||||
|
||||
def wait_for_health_clear(self, timeout):
|
||||
"""
|
||||
Wait until `ceph health` returns no messages
|
||||
"""
|
||||
def is_clear():
|
||||
health = self.fs.mon_manager.get_mon_health()
|
||||
return len(health['summary']) == 0
|
||||
|
||||
self.wait_until_true(is_clear, timeout)
|
||||
|
@ -80,6 +80,11 @@ class TestMDSAutoRepair(CephFSTestCase):
|
||||
# background writer also should fail
|
||||
self.assertTrue(writer.finished)
|
||||
|
||||
# The MDS should report its readonly health state to the mon
|
||||
self.wait_for_health("MDS in read-only mode", timeout=30)
|
||||
|
||||
# restart mds to make it writable
|
||||
self.fs.mds_fail_restart()
|
||||
self.fs.wait_for_daemons()
|
||||
|
||||
self.wait_for_health_clear(timeout=30)
|
||||
|
Loading…
Reference in New Issue
Block a user