mirror of
https://github.com/ceph/ceph
synced 2025-04-08 10:42:01 +00:00
Thrashers that do not inherit from ThrasherGreenlet previously used a
method called do_join, which combined stop and join functionality. To
ensure consistency and clarity, we want all thrashers to use separate
stop, join, and stop_and_join methods.
This commit renames methods and implements missing stop and stop_and_join
methods in thrashers that did not inherit from ThrasherGreenlet.
Fixes: https://tracker.ceph.com/issues/66698
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit a035b5a22f
)
21 lines
391 B
Python
21 lines
391 B
Python
"""
|
|
Thrasher base class
|
|
"""
|
|
|
|
|
|
class Thrasher(object):
|
|
|
|
def __init__(self):
|
|
super(Thrasher, self).__init__()
|
|
self._exception = None
|
|
|
|
@property
|
|
def exception(self):
|
|
return self._exception
|
|
|
|
def set_thrasher_exception(self, e):
|
|
self._exception = e
|
|
|
|
def stop(self):
|
|
raise NotImplementedError("Subclasses didn't implement this method.")
|