From: Patrick Donnelly Date: Tue, 11 Apr 2023 14:16:53 +0000 (-0400) Subject: qa: check each fs for health X-Git-Tag: v16.2.14~159^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=acbc33208f1a8ff19138ed7b704f4ebf04cece8c;p=ceph.git qa: check each fs for health Fixes: https://tracker.ceph.com/issues/59425 Signed-off-by: Patrick Donnelly (cherry picked from commit 06c90a6c484f961c2b9b53d26080c38699555180) --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index a6eab9be808a2..c9d361969c886 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -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): """ diff --git a/qa/tasks/cephfs/filesystem.py b/qa/tasks/cephfs/filesystem.py index 1918fcd7ee275..cf4c883037191 100644 --- a/qa/tasks/cephfs/filesystem.py +++ b/qa/tasks/cephfs/filesystem.py @@ -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.