]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: mds_thrash updates for new max_mds behavior
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 14 Apr 2018 00:22:29 +0000 (17:22 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 17 Apr 2018 18:26:56 +0000 (11:26 -0700)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/mds_thrash.py

index 5349296f6ab0b234e33a13d0cc3a469d092b1e0c..af5fe784261b2005626c7d4727ba887cd64edf72 100644 (file)
@@ -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):