[vdsm] Exception handling in supervdsm calls

Balamurugan Arumugam barumuga at redhat.com
Mon May 28 12:31:39 UTC 2012


Hi Saggi,

I see if a method in supervdsm throws exception which is not thrown properly to the upper level and unexcepted exception is thrown to the user.  Reproducer for master branch is 
# vdsClient localhost glusterVolumeDelete non-existent-volume

Respective log is

Thread-14::DEBUG::2012-05-04 18:42:18,513::BindingXMLRPC::874::vds::(wrapper) client [127.0.0.1]::call wrapper with ('hello',) {}
MainProcess|Thread-14::DEBUG::2012-05-04 18:42:18,515::__init__::1241::Storage.Misc.excCmd::(_log) '/usr/sbin/gluster --mode=script volume delete hello' (cwd None)
MainProcess|Thread-14::DEBUG::2012-05-04 18:42:18,540::__init__::1241::Storage.Misc.excCmd::(_log) FAILED: <err> = ''; <rc> = 255
MainProcess|Thread-14::ERROR::2012-05-04 18:42:18,541::supervdsmServer::74::SuperVdsm.ServerCallback::(wrapper) Error in wrapper
Traceback (most recent call last):
File "/usr/share/vdsm/supervdsmServer.py", line 72, in wrapper
return func(*args, **kwargs)
File "/usr/share/vdsm/supervdsmServer.py", line 259, in wrapper
return func(*args, **kwargs)
File "/usr/share/vdsm/gluster/gluster_cli.py", line 37, in wrapper
return func(*args, **kwargs)
File "/usr/share/vdsm/gluster/gluster_cli.py", line 202, in volumeDelete
raise ge.GlusterVolumeDeleteFailedException(rc, out, err)
GlusterVolumeDeleteFailedException: Volume delete failed
error: Volume hello does not exist

return code: 255
Thread-14::ERROR::2012-05-04 18:42:18,543::BindingXMLRPC::892::vds::(wrapper) unexpected error
Traceback (most recent call last):
File "/usr/share/vdsm/BindingXMLRPC.py", line 879, in wrapper
res = f(*args, **kwargs)
File "/usr/share/vdsm/gluster/gluster_api.py", line 29, in wrapper
return func(*args, **kwargs)
File "/usr/share/vdsm/gluster/gluster_api.py", line 101, in volumeDelete
if self.svdsmProxy.glusterVolumeDelete(volumeName):
File "/usr/share/vdsm/supervdsm.py", line 67, in __call__
return callMethod()
File "/usr/share/vdsm/supervdsm.py", line 65, in <lambda>
**kwargs)
File "<string>", line 2, in glusterVolumeDelete
File "/usr/lib64/python2.7/multiprocessing/managers.py", line 759, in _callmethod
kind, result = conn.recv()
TypeError: ('__init__() takes exactly 4 arguments (1 given)', <class 'gluster.gluster_exception.GlusterVolumeDeleteFailedException'>, ())


As gluster method used in gluster verbs throw error as exception, the user gets weird error 'unexpected exception' than actual error.  I came up with a patch http://gerrit.ovirt.org/#change,4750 to do workaround.  As per Dan's review, he guesses it would be a bug in supervdsm.

Is this a bug?  How can I help for the fix?

Regards,
Bala



More information about the vdsm-devel mailing list