From: Yuri Weinstein Date: Sat, 6 May 2023 00:13:59 +0000 (+0000) Subject: qa: check each fs for health X-Git-Tag: v16.2.13~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8f93a58b82b94b6c9ac48277cc15bd48d4c0a902;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) (cherry picked from commit acbc33208f1a8ff19138ed7b704f4ebf04cece8c) --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index a6eab9be808a..c9d361969c88 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 1918fcd7ee27..cf4c88303719 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.