From: Patrick Donnelly Date: Sat, 14 Apr 2018 00:22:29 +0000 (-0700) Subject: qa: mds_thrash updates for new max_mds behavior X-Git-Tag: v13.1.0~200^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1dc5b625576896e7baf5cb004b0625431beb121c;p=ceph.git qa: mds_thrash updates for new max_mds behavior Signed-off-by: Patrick Donnelly --- diff --git a/qa/tasks/mds_thrash.py b/qa/tasks/mds_thrash.py index 5349296f6ab0..af5fe784261b 100644 --- a/qa/tasks/mds_thrash.py +++ b/qa/tasks/mds_thrash.py @@ -153,8 +153,7 @@ class MDSThrasher(Greenlet): thrash_max_mds: [default: 0.05] likelihood that the max_mds of the mds cluster will be modified to a value [1, current) or (current, starting - max_mds]. When reduced, randomly selected MDSs other than rank 0 will be - deactivated to reach the new max_mds. Value should be between 0.0 and 1.0. + max_mds]. Value should be between 0.0 and 1.0. thrash_while_stopping: [default: false] thrash an MDS while there are MDS in up:stopping (because max_mds was changed and some @@ -314,7 +313,7 @@ class MDSThrasher(Greenlet): self.log("cluster has %d actives (max_mds is %d), no MDS can replace rank %d".format(len(actives), max_mds, rank)) return status else: - if len(actives) >= max_mds: + if len(actives) == max_mds: self.log('mds cluster has {count} alive and active, now stable!'.format(count = len(actives))) return status, None if itercount > 300/2: # 5 minutes @@ -359,18 +358,7 @@ class MDSThrasher(Greenlet): self.log('thrashing max_mds: %d -> %d' % (max_mds, new_max_mds)) self.fs.set_max_mds(new_max_mds) stats['max_mds'] += 1 - - targets = filter(lambda r: r['rank'] >= new_max_mds, status.get_ranks(self.fs.id)) - if len(targets) > 0: - # deactivate mds in decending order - targets = sorted(targets, key=lambda r: r['rank'], reverse=True) - for target in targets: - self.log("deactivating rank %d" % target['rank']) - self.fs.deactivate(target['rank']) - stats['deactivate'] += 1 - status = self.wait_for_stable()[0] - else: - status = self.wait_for_stable()[0] + self.wait_for_stable() count = 0 for info in status.get_ranks(self.fs.id):