From 8a535d9c72965c79692dccc6ff418b46fb86c3eb Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 20 Sep 2017 15:44:40 -0700 Subject: [PATCH] qa: get config only on running MDS Fixes: http://tracker.ceph.com/issues/21466 Signed-off-by: Patrick Donnelly --- qa/tasks/cephfs/filesystem.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qa/tasks/cephfs/filesystem.py b/qa/tasks/cephfs/filesystem.py index 3d06c0d6d12..44f6cbaf16d 100644 --- a/qa/tasks/cephfs/filesystem.py +++ b/qa/tasks/cephfs/filesystem.py @@ -8,6 +8,7 @@ import time import datetime import re import errno +import random from teuthology.exceptions import CommandFailedError from teuthology import misc @@ -225,6 +226,17 @@ class MDSCluster(CephCluster): else: cb(mds_id) + def get_config(self, key, service_type=None): + """ + get_config specialization of service_type="mds" + """ + if service_type != "mds": + return super(MDSCluster, self).get_config(key, service_type) + + # Some tests stop MDS daemons, don't send commands to a dead one: + service_id = random.sample(filter(lambda i: self.mds_daemons[i].running(), self.mds_daemons), 1)[0] + return self.json_asok(['config', 'get', key], service_type, service_id)[key] + def mds_stop(self, mds_id=None): """ Stop the MDS daemon process(se). If it held a rank, that rank -- 2.39.5