Hide Forgot
Description of problem: Calling storage apis with incorrect arguments log tracebacks in the log: 2016-12-07 10:09:52,868 ERROR (jsonrpc/3) [storage.TaskManager.Task] (Task='a046981d-7fb2-4081-9bd9-f12e45ddf817') Unexpected error (task:870) Traceback (most recent call last): File "/usr/share/vdsm/storage/task.py", line 877, in _run return fn(*args, **kargs) File "/usr/lib/python2.7/site-packages/vdsm/logUtils.py", line 50, in wrapper res = f(*args, **kwargs) File "/usr/share/vdsm/storage/hsm.py", line 2496, in getStoragePoolInfo pool = self.getPool(spUUID) File "/usr/share/vdsm/storage/hsm.py", line 327, in getPool raise se.StoragePoolUnknown(spUUID) StoragePoolUnknown: Unknown pool id, pool not connected: (u'xxxyyy',) In this case, the pool id (xxxyyy) was incorrect. This is a user error and not vdsm error, so we should log a warning instead. The text of the exception is a good description of the warning, so we just need to handle the exception properly in the top level error handler. To handle exceptions properly, vdsm needs to have a sane exception hierarchy: VdsmError ClientError InvalidArgument PoolNotConnected ... ServerError Then the top level handler can log ClientError as warnings, and ServerError with useful traceback. Version-Release number of selected component (if applicable): Any How reproducible: Always Steps to Reproduce: 1. Call with invalid argument, or call a method which is not allowed in the current state (e.g spm method when spm is not started). We have the same issue in other parts of the code (infra, virt, sla).
Closing old bugs, please reopen if still needed, in any case patches are welcome.