]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: check each fs for health 51232/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 11 Apr 2023 14:16:53 +0000 (10:16 -0400)
committerRishabh Dave <ridave@redhat.com>
Wed, 26 Apr 2023 14:25:51 +0000 (19:55 +0530)
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 a6eab9be808a2fd7fab4619f56bf99470045a027..c9d361969c88639bc1b6e6400c3b242abb75d118 100644 (file)
@@ -1474,9 +1474,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 1918fcd7ee27595681fc1c9bbe2f85cd4c9b32ce..cf4c8830371911d72bfd610b36be17822f935b59 100644 (file)
@@ -486,6 +486,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.