Timothy Asir has uploaded a new change for review. Change subject: gluster: fix TypeError in exception.py ......................................................................
gluster: fix TypeError in exception.py Currently gluster cli functions throws error in exception due to a bug in python multiprocess http://bugs.python.org/issue15440 which fails to re-raise in supervdsm side. This is workaround fix to set optional arguments to constructor of VdsmException and GlusterException Traceback (most recent call last): File "/usr/share/vdsm/rpc/BindingXMLRPC.py", line 1136, in wrapper res = f(*args, **kwargs) File "/usr/share/vdsm/gluster/api.py", line 80, in wrapper rv = func(*args, **kwargs) File "/usr/share/vdsm/gluster/api.py", line 686, in createBrick raidParams) File "/usr/share/vdsm/supervdsm.py", line 50, in __call__ return callMethod() File "/usr/share/vdsm/supervdsm.py", line 48, in <lambda> **kwargs) File "<string>", line 2, in glusterCreateBrick File "/usr/lib64/python2.6/multiprocessing/managers.py", line 726, in _callmethod kind, result = conn.recv() TypeError: ('__init__() takes exactly 2 arguments (1 given)', <class 'gluster.exception.GlusterHostStorageDeviceInUseException'>, ()) Change-Id: I9a0622baf0e2fcba810f9ef3e36a1ea8b95b61c4 Signed-off-by: Timothy Asir Jeyasingh <[email protected]> --- M vdsm/gluster/exception.py 1 file changed, 14 insertions(+), 12 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/45001/1 diff --git a/vdsm/gluster/exception.py b/vdsm/gluster/exception.py index f45d249..3749e14 100644 --- a/vdsm/gluster/exception.py +++ b/vdsm/gluster/exception.py @@ -369,7 +369,7 @@ class GlusterHostStorageDeviceNotFoundException(GlusterHostException): code = 4409 - def __init__(self, deviceList): + def __init__(self, deviceList=None): GlusterHostException.__init__(self) self.message = "Device(s) %s not found" % deviceList @@ -377,7 +377,7 @@ class GlusterHostStorageDeviceInUseException(GlusterHostException): code = 4410 - def __init__(self, deviceList): + def __init__(self, deviceList=None): GlusterHostException.__init__(self) self.message = "Device(s) %s already in use" % deviceList @@ -385,7 +385,8 @@ class GlusterHostStorageDeviceMountFailedException(GlusterHostException): code = 4411 - def __init__(self, device, mountPoint, fsType, mountOpts): + def __init__(self, device=None, mountPoint=None, + fsType=None, mountOpts=None): GlusterHostException.__init__(self) self.message = "Failed to mount device %s on mount point %s using " \ "fs-type %s with mount options %s" % ( @@ -395,7 +396,7 @@ class GlusterHostStorageDeviceFsTabFoundException(GlusterHostException): code = 4412 - def __init__(self, device): + def __init__(self, device=None): GlusterHostException.__init__(self) self.message = "fstab entry for device %s already exists" % device @@ -403,7 +404,7 @@ class GlusterHostStorageDevicePVCreateFailedException(GlusterHostException): code = 4413 - def __init__(self, device, alignment, rc=0, out=(), err=()): + def __init__(self, device=None, alignment=None, rc=0, out=(), err=()): self.rc = rc self.out = out self.err = err @@ -414,7 +415,7 @@ class GlusterHostStorageDeviceLVConvertFailedException(GlusterHostException): code = 4414 - def __init__(self, device, alignment, rc=0, out=(), err=()): + def __init__(self, device=None, alignment=None, rc=0, out=(), err=()): self.rc = rc self.out = out self.err = err @@ -425,7 +426,7 @@ class GlusterHostStorageDeviceLVChangeFailedException(GlusterHostException): code = 4415 - def __init__(self, poolName, rc=0, out=(), err=()): + def __init__(self, poolName=None, rc=0, out=(), err=()): self.rc = rc self.out = out self.err = err @@ -441,7 +442,7 @@ class GlusterHostStorageMountPointInUseException(GlusterHostException): code = 4417 - def __init__(self, mountPoint): + def __init__(self, mountPoint=None): GlusterHostException.__init__(self) self.message = "Mount point %s is in use" % mountPoint @@ -449,7 +450,8 @@ class GlusterHostStorageDeviceVGCreateFailedException(GlusterHostException): code = 4418 - def __init__(self, name, devices, stripeSize, rc=0, out=(), err=()): + def __init__(self, name=None, devices=None, stripeSize=None, + rc=0, out=(), err=()): self.rc = rc self.out = out self.err = err @@ -486,7 +488,7 @@ class GlusterHookNotFoundException(GlusterHookException): code = 4504 - def __init__(self, glusterCmd, level, hookName): + def __init__(self, glusterCmd=None, level=None, hookName=None): GlusterHookException.__init__(self) self.glusterCmd = glusterCmd self.level = level @@ -509,7 +511,7 @@ class GlusterHookAlreadyExistException(GlusterHookException): code = 4507 - def __init__(self, glusterCmd, level, hookName): + def __init__(self, glusterCmd=None, level=None, hookName=None): GlusterHookException.__init__(self) self.glusterCmd = glusterCmd self.level = level @@ -522,7 +524,7 @@ class GlusterHookCheckSumMismatchException(GlusterException): code = 4508 - def __init__(self, computedMd5Sum, expectedMd5Sum): + def __init__(self, computedMd5Sum=None, expectedMd5Sum=None): GlusterHookException.__init__(self) self.computedMd5Sum = computedMd5Sum self.expectedMd5Sum = expectedMd5Sum -- To view, visit https://gerrit.ovirt.org/45001 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a0622baf0e2fcba810f9ef3e36a1ea8b95b61c4 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Timothy Asir <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
