Fixes the bug during DaemonWatchdog testing:
Traceback (most recent call last):
File "/home/teuthworker/src/github.com_ceph_ceph-c_wip-daemonwatchdog-testing13/qa/tasks/daemonwatchdog.py", line 38, in _run
self.watch()
File "/home/teuthworker/src/github.com_ceph_ceph-c_wip-daemonwatchdog-testing13/qa/tasks/daemonwatchdog.py", line 112, in watch
if thrasher.e is not None:
AttributeError: MonitorThrasher instance has no attribute 'e'
Signed-off-by: Jos Collin <jcollin@redhat.com>
self.manager = manager
self.manager.wait_for_clean()
+ self.e = None
self.stopping = False
self.logger = logger
self.config = config
return m
def do_thrash(self):
+ """
+ _do_thrash() wrapper.
+ """
+ try:
+ self._do_thrash()
+ except Exception as e:
+ # See _run exception comment for MDSThrasher
+ self.e = e
+ self.logger.exception("exception:")
+ # Allow successful completion so gevent doesn't see an exception.
+ # The DaemonWatchdog will observe the error and tear down the test.
+
+ def _do_thrash(self):
"""
Continuously loop and thrash the monitors.
"""