From: Patrick Donnelly Date: Wed, 20 Sep 2017 22:44:40 +0000 (-0700) Subject: qa: get config only on running MDS X-Git-Tag: v13.0.1~844^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8a535d9c72965c79692dccc6ff418b46fb86c3eb;p=ceph-ci.git qa: get config only on running MDS Fixes: http://tracker.ceph.com/issues/21466 Signed-off-by: Patrick Donnelly --- 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