From: Jos Collin Date: Wed, 6 Nov 2019 07:47:40 +0000 (+0530) Subject: qa/tasks: Fixed AttributeError: can't set attribute X-Git-Tag: v15.1.0~657^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4c67888ad86f6cc29ec1b86ed1898703ba03062d;p=ceph.git qa/tasks: Fixed AttributeError: can't set attribute Fixes: https://tracker.ceph.com/issues/42636 Signed-off-by: Jos Collin --- diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index bf7d131a6d74..ed5b2c92624e 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -967,7 +967,7 @@ class OSDThrasher(Thrasher): self._do_thrash() except Exception as e: # See _run exception comment for MDSThrasher - self.exception = e + self.set_thrasher_exception(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. diff --git a/qa/tasks/mds_thrash.py b/qa/tasks/mds_thrash.py index fc5a5514fefa..d8c74250dd53 100644 --- a/qa/tasks/mds_thrash.py +++ b/qa/tasks/mds_thrash.py @@ -136,7 +136,7 @@ class MDSThrasher(Thrasher, Greenlet): # File "/usr/lib/python2.7/traceback.py", line 13, in _print # file.write(str+terminator) # 2017-02-03T14:34:01.261 CRITICAL:root:IOError - self.exception = e + self.set_thrasher_exception(e) self.logger.exception("exception:") # allow successful completion so gevent doesn't see an exception... diff --git a/qa/tasks/mon_thrash.py b/qa/tasks/mon_thrash.py index d82141574e22..16680538b5d9 100644 --- a/qa/tasks/mon_thrash.py +++ b/qa/tasks/mon_thrash.py @@ -232,7 +232,7 @@ class MonitorThrasher(Thrasher): self._do_thrash() except Exception as e: # See _run exception comment for MDSThrasher - self.exception = e + self.set_thrasher_exception(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. diff --git a/qa/tasks/rbd_mirror_thrash.py b/qa/tasks/rbd_mirror_thrash.py index 2dbe43ceea07..d7fdf5607f9f 100644 --- a/qa/tasks/rbd_mirror_thrash.py +++ b/qa/tasks/rbd_mirror_thrash.py @@ -86,7 +86,7 @@ class RBDMirrorThrasher(Thrasher, Greenlet): self.do_thrash() except Exception as e: # See _run exception comment for MDSThrasher - self.exception = e + self.set_thrasher_exception(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. diff --git a/qa/tasks/thrasher.py b/qa/tasks/thrasher.py index b34c747703ad..0ea1bf0ee9bc 100644 --- a/qa/tasks/thrasher.py +++ b/qa/tasks/thrasher.py @@ -11,6 +11,5 @@ class Thrasher(object): def exception(self): return self._exception - @exception.setter - def exception(self, e): + def set_thrasher_exception(self, e): self._exception = e