From 2acdfdd5311f8848fd4c567660b7de115ed46ed9 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 db86d6d53cc4..b13f73bafed6 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -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): """ diff --git a/qa/tasks/cephfs/filesystem.py b/qa/tasks/cephfs/filesystem.py index 57f1d5d229b5..8c7154f6cba8 100644 --- a/qa/tasks/cephfs/filesystem.py +++ b/qa/tasks/cephfs/filesystem.py @@ -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. -- 2.47.3