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
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
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):