Change in vdsm[master]: gluster: Get size information of a gluster volume.
barumuga at redhat.com
barumuga at redhat.com
Wed Jun 11 11:54:26 UTC 2014
Bala.FA has posted comments on this change.
Change subject: gluster: Get size information of a gluster volume.
......................................................................
Patch Set 3:
(6 comments)
http://gerrit.ovirt.org/#/c/28581/3/vdsm/gluster/exception.py
File vdsm/gluster/exception.py:
Line 504:
Line 505:
Line 506: class GlfsInitException(GlusterLibgfapiException):
Line 507: code = 4573
Line 508: message = "glfs inint failed"
please fix the text
Line 509:
Line 510:
Line 511: class GlfsFiniException(GlusterLibgfapiException):
Line 512: code = 4574
Line 509:
Line 510:
Line 511: class GlfsFiniException(GlusterLibgfapiException):
Line 512: code = 4574
Line 513: message = "glfs finit failed"
please fix the text
http://gerrit.ovirt.org/#/c/28581/3/vdsm/gluster/gfapi.py
File vdsm/gluster/gfapi.py:
Line 76: protocol,
Line 77: host,
Line 78: port)
Line 79: if rc != 0:
Line 80: raise ge.GlfsSetVolfileServerException(rc=rc)
I feel to use ge.GlfsInitException() than having additional ge.GlfsSetVolfileServerException() ie its too verbose.
Its up to you to decide.
Line 81:
Line 82: _glfs_init = ctypes.CFUNCTYPE(
Line 83: ctypes.c_int, ctypes.c_void_p)(('glfs_init', _api))
Line 84: rc = _glfs_init(fs)
Line 85: if rc == 0:
Line 86: return fs
Line 87: elif rc == 1:
Line 88: errMsg = "Volume is stopped."
Line 89: raise ge.GlfsInitException(rc=rc, err=[errMsg])
How about err=["Volume %s is not running" % volumeName] ?
Line 90: elif rc == -1:
Line 91: errMsg = "Volume not found."
Line 92: raise ge.GlfsInitException(rc=rc, err=[errMsg])
Line 93: else:
Line 88: errMsg = "Volume is stopped."
Line 89: raise ge.GlfsInitException(rc=rc, err=[errMsg])
Line 90: elif rc == -1:
Line 91: errMsg = "Volume not found."
Line 92: raise ge.GlfsInitException(rc=rc, err=[errMsg])
How about err=["Volume %s is not found" % volumeName] ?
Line 93: else:
Line 94: raise ge.GlfsInitException(rc=rc)
Line 95:
Line 96:
Line 90: elif rc == -1:
Line 91: errMsg = "Volume not found."
Line 92: raise ge.GlfsInitException(rc=rc, err=[errMsg])
Line 93: else:
Line 94: raise ge.GlfsInitException(rc=rc)
Its required give some err. may be unknown error?
Line 95:
Line 96:
Line 97: def glfsFini(fs, volumeId):
Line 98: _glfs_fini = ctypes.CFUNCTYPE(
--
To view, visit http://gerrit.ovirt.org/28581
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If5d622738ae955eb4002f56fc73adb4f07f0b857
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Aravinda VK <avishwan at redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list