From: Sebastian Wagner Date: Fri, 14 Feb 2020 14:35:39 +0000 (+0100) Subject: mgr/orchestrator: exception pickle: don't raise X-Git-Tag: v15.1.1~363^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c296889d0705846fc248e02c3e8f1dc25bb5edd7;p=ceph.git mgr/orchestrator: exception pickle: don't raise Otherwiese the pickle exception hides the underlying root cause. Signed-off-by: Sebastian Wagner --- diff --git a/src/pybind/mgr/orchestrator/_interface.py b/src/pybind/mgr/orchestrator/_interface.py index ba5284b034b9..e6915b9c0a34 100644 --- a/src/pybind/mgr/orchestrator/_interface.py +++ b/src/pybind/mgr/orchestrator/_interface.py @@ -243,7 +243,11 @@ class _Promise(object): @_exception.setter def _exception(self, e): self._exception_ = e - self._serialized_exception_ = pickle.dumps(e) if e is not None else None + try: + self._serialized_exception_ = pickle.dumps(e) if e is not None else None + except Exception: + logger.exception("failed to pickle {}".format(e)) + # We can't properly raise anything here. Just hope for the best. @property def _serialized_exception(self):