Change in vdsm[master]: gluster: Verify volume is Replica 3

nsoffer at redhat.com nsoffer at redhat.com
Mon Jun 8 21:02:29 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: gluster: Verify volume is Replica 3
......................................................................


Patch Set 6:

(4 comments)

https://gerrit.ovirt.org/#/c/41931/6/vdsm/storage/storageServer.py
File vdsm/storage/storageServer.py:

Line 273:         self._volfileServer, volname = self._remotePath.split(":", 1)
Line 274:         self._volname = volname.strip('/')
Line 275:         self._volInfo = \
Line 276:             supervdsm.getProxy().glusterVolumeInfo(self._volname,
Line 277:                                                    self._volfileServer)
Don't do stuff in init, specially not call another process (supervdsm) which will run a command line (gluster) which access a remote server.

What was wrong with the previous code, checking during connect?
Line 278: 
Line 279:     def connect(self):
Line 280:         if not self._volInfo[self._volname]['replicaCount'] == '3':
Line 281:             raise se.GlusterVolumeNotReplicaThreeException()


https://gerrit.ovirt.org/#/c/41931/6/vdsm/storage/storage_exception.py
File vdsm/storage/storage_exception.py:

Line 1195:     code = 479
Line 1196:     message = "Connection Reference ID was not registered"
Line 1197: 
Line 1198: 
Line 1199: class GlusterVolumeNotReplicaThreeException(StorageException):
How about:

    UnsupportedGlusterVolumeReplicaCountError
Line 1200:     code = 4710
Line 1201:     message = "Only Gluster volume Replica 3 is supported"
Line 1202: 
Line 1203: 


Line 1196:     message = "Connection Reference ID was not registered"
Line 1197: 
Line 1198: 
Line 1199: class GlusterVolumeNotReplicaThreeException(StorageException):
Line 1200:     code = 4710
Why not 480?
Line 1201:     message = "Only Gluster volume Replica 3 is supported"
Line 1202: 
Line 1203: 
Line 1204: #################################################


Line 1197: 
Line 1198: 
Line 1199: class GlusterVolumeNotReplicaThreeException(StorageException):
Line 1200:     code = 4710
Line 1201:     message = "Only Gluster volume Replica 3 is supported"
We don't want an error to be too specific, since we will have to add new error for each configuration. We need something that help to find the documentation, which will state which replica count is supported and which are not.
Line 1202: 
Line 1203: 
Line 1204: #################################################
Line 1205: #  LVM related Exceptions


-- 
To view, visit https://gerrit.ovirt.org/41931
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1fee5d023706e2a0613201a9afef7d285b08442f
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list