xapi-project / xapi-storage

Experimental new storage interface for xapi
https://xapi-project.github.io/xapi-storage/
9 stars 19 forks source link

CA-272163: do not lose exception type during RPC #66

Closed edwintorok closed 6 years ago

edwintorok commented 6 years ago

If the backend raises a subclass of Rpc_light_failure we were only passing through the arguments, but not the actual exception name. So the caller had no way to tell which exception we raised.

We need to know the correct exception when we raise the snapshot redirect exception, otherwise XAPI just receives a generic exception it doesn't know what to do with: result.contents: ["Backend_error_with_backtrace",["SR_BACKEND_FAILURE",["{\"error\":\"7fe5d42c-e165-4814-8263-2408cd132a61\"

This is related to the exception transformation we discussed with @gaborigloi

Signed-off-by: Edwin Török edvin.torok@citrix.com

mseri commented 6 years ago

It would be nice to also make sure that the python code passes the linting, although this is independent of this PR

edwintorok commented 6 years ago

Fixed the travis build here: https://github.com/xapi-project/xapi-storage/pull/67