From acbc33208f1a8ff19138ed7b704f4ebf04cece8c Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 11 Apr 2023 10:16:53 -0400 Subject: [PATCH] qa: check each fs for health Fixes: https://tracker.ceph.com/issues/59425 Signed-off-by: Patrick Donnelly (cherry picked from commit 06c90a6c484f961c2b9b53d26080c38699555180) --- qa/tasks/ceph.py | 5 ++--- qa/tasks/cephfs/filesystem.py | 11 +++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) 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. -- 2.39.5