]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/orch: try harder when pickle fails to marshal an exception
authorKefu Chai <kchai@redhat.com>
Tue, 3 Mar 2020 16:18:35 +0000 (00:18 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 3 Mar 2020 17:52:02 +0000 (01:52 +0800)
commit146fd472a157b6906b857b75dc437dae7f8ef428
tree5a74a7c1a2d0d374885af40a3256d4a7b6f3f33c
parenta91c3112a9364a17f846d80ceadedb187ef0510f
mgr/orch: try harder when pickle fails to marshal an exception

pickle cannot marshal instances of class not defined in the top level of
a module. for instance, `DriveGroupValidationError` is defined in a
submodule of `ceph` python module, that's why we cannot capture it.

this prevent the `ceph` command line from getting a proper error when
the command fails if the command is implemented using cross python
module call(s).

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/orchestrator/_interface.py