]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orchestrator: log exception from wrapper
authorSage Weil <sage@newdream.net>
Fri, 15 Oct 2021 15:44:59 +0000 (10:44 -0500)
committerSebastian Wagner <sewagner@redhat.com>
Tue, 2 Nov 2021 09:02:51 +0000 (10:02 +0100)
This lets us see a proper traceback when we are calling across
modules.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 9502953d4dfcd794fcc9400bb52ebf229abb5517)

src/pybind/mgr/orchestrator/_interface.py

index 97232e15f69b775ae00daa9526499a680fb6a0da..ca5194b5337e34eeb213dc7cc25d60616137186b 100644 (file)
@@ -124,6 +124,7 @@ def handle_orch_error(f: Callable[..., T]) -> Callable[..., 'OrchResult[T]']:
         try:
             return OrchResult(f(*args, **kwargs))
         except Exception as e:
+            logger.exception(e)
             return OrchResult(None, exception=e)
 
     return cast(Callable[..., OrchResult[T]], wrapper)