Object used to thrash Ceph
"""
def __init__(self, manager, config, logger):
- super(OSDThrasher, self).__init__()
+ Thrasher.__init__(self, "OSDThrasher")
+
self.ceph_manager = manager
self.cluster = manager.cluster
self.ceph_manager.wait_for_clean()
for thrasher in self.thrashers:
if thrasher.exception is not None:
- self.log("thrasher on fs.{name} failed".format(name=thrasher.fs.name))
+ self.log("{name} failed".format(name=thrasher.name))
bark = True
if bark:
"""
def __init__(self, ctx, manager, config, fs, max_mds):
- super(MDSThrasher, self).__init__()
+ Greenlet.__init__(self)
+ Thrasher.__init__(self, "MDSThrasher")
self.config = config
self.ctx = ctx
for fs in status.get_filesystems():
thrasher = MDSThrasher(ctx, manager, config, Filesystem(ctx, fs['id']), fs['mdsmap']['max_mds'])
+ thrasher.name = thrasher.name + " on fs." + thrasher.fs.name
thrasher.start()
ctx.ceph[config['cluster']].thrashers.append(thrasher)
- mon/workloadgen.sh
"""
def __init__(self, ctx, manager, config, logger):
- super(MonitorThrasher, self).__init__()
+ Thrasher.__init__(self, "MonitorThrasher")
+
self.ctx = ctx
self.manager = manager
self.manager.wait_for_clean()
"""
def __init__(self, ctx, config, cluster, daemons):
- super(RBDMirrorThrasher, self).__init__()
+ Greenlet.__init__(self)
+ Thrasher.__init__(self, "RBDMirrorThrasher")
self.ctx = ctx
self.config = config
"""
class Thrasher(object):
- def __init__(self):
+ def __init__(self, n):
super(Thrasher, self).__init__()
- self.exception = None
+ self._exception = None
+ self._name = n
@property
def exception(self):
@exception.setter
def exception(self, e):
self._exception = e
+
+ @property
+ def name(self):
+ return self._name
+
+ @name.setter
+ def name(self, n):
+ self._name = n