From 57c8962a10da93d0ce27b2965c9a156cdd3ceacc Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 11 Mar 2021 07:31:25 -0800 Subject: [PATCH] qa: use mds_tell for getting mds status mds_asok is broken with cephadm currently due to [1]. [1] https://tracker.ceph.com/issues/48019#note-5 Signed-off-by: Patrick Donnelly (cherry picked from commit 6ca48f633085826ac52e45dd6e40f60ab74b31ec) --- qa/tasks/cephfs/filesystem.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qa/tasks/cephfs/filesystem.py b/qa/tasks/cephfs/filesystem.py index 0c025d0a6d3af..3c07a99edcf09 100644 --- a/qa/tasks/cephfs/filesystem.py +++ b/qa/tasks/cephfs/filesystem.py @@ -903,7 +903,7 @@ class Filesystem(MDSCluster): for mds_id, mds_status in mds_map['info'].items(): if mds_status['state'] == 'up:active': try: - daemon_status = self.mds_asok(["status"], mds_id=mds_status['name']) + daemon_status = self.mds_tell(["status"], mds_id=mds_status['name']) except CommandFailedError as cfe: if cfe.exitstatus == errno.EINVAL: # Old version, can't do this check @@ -1117,6 +1117,12 @@ class Filesystem(MDSCluster): return self.json_asok(command, 'mds', mds_id, timeout=timeout) + def mds_tell(self, command, mds_id=None): + if mds_id is None: + mds_id = self.get_lone_mds_id() + + return json.loads(self.mon_manager.raw_cluster_cmd("tell", f"mds.{mds_id}", *command)) + def rank_asok(self, command, rank=0, status=None, timeout=None): info = self.get_rank(rank=rank, status=status) return self.json_asok(command, 'mds', info['name'], timeout=timeout) -- 2.39.5