]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: check each fs for health 52241/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 11 Apr 2023 14:16:53 +0000 (10:16 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 28 Jun 2023 15:41:55 +0000 (11:41 -0400)
Fixes: https://tracker.ceph.com/issues/59425
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 06c90a6c484f961c2b9b53d26080c38699555180)

qa/tasks/ceph.py
qa/tasks/cephfs/filesystem.py

index db86d6d53cc467a877533dd0b33fe4a98463aeca..b13f73bafed6d3f124ddd7d652917b8d0e3a9631 100644 (file)
@@ -1470,9 +1470,8 @@ def healthy(ctx, config):
 
     if ctx.cluster.only(teuthology.is_type('mds', cluster_name)).remotes:
         # Some MDSs exist, wait for them to be healthy
-        ceph_fs = Filesystem(ctx) # TODO: make Filesystem cluster-aware
-        ceph_fs.wait_for_daemons(timeout=300)
-
+        for fs in Filesystem.get_all_fs(ctx):
+            fs.wait_for_daemons(timeout=300)
 
 def wait_for_mon_quorum(ctx, config):
     """
index 57f1d5d229b51dd9828813314693bf0601bbeac8..8c7154f6cba8a7ba1d9926512c849d800dc3abab 100644 (file)
@@ -488,6 +488,17 @@ class MDSCluster(CephCluster):
 
 
 class Filesystem(MDSCluster):
+
+    """
+    Generator for all Filesystems in the cluster.
+    """
+    @classmethod
+    def get_all_fs(cls, ctx):
+        mdsc = MDSCluster(ctx)
+        status = mdsc.status()
+        for fs in status.get_filesystems():
+            yield cls(ctx, fscid=fs['id'])
+
     """
     This object is for driving a CephFS filesystem.  The MDS daemons driven by
     MDSCluster may be shared with other Filesystems.