Nir Soffer has posted comments on this change.

Change subject: gluster: Allow gluster mount with additional servers
......................................................................


Patch Set 17:

(2 comments)

https://gerrit.ovirt.org/#/c/40665/17/tests/storageServerTests.py
File tests/storageServerTests.py:

Line 85:         storageServer.supervdsm.glusterVolumeInfo = glusterVolumeInfo
Line 86: 
Line 87:         gluster = GlusterFSConnection(spec="192.168.122.1:/music")
Line 88:         self.assertEquals(gluster.options,
Line 89:                           
"backup-volfile-servers=192.168.122.2:192.168.122.3")
These tests are nice, but we don't see the original user options.

This may actually hide a bug, since mount options are usually separate by "," 
but you are just combining self.options + self._gluster_options.

You should test two cases:

- user options empty + gluster options
- user options non-empty + gluster options

These tests seems ok for the first option, lets add a test for non-empty user 
options.
Line 90: 
Line 91:     @MonkeyPatch(storageServer, 'supervdsm', FakeSupervdsm())
Line 92:     def test_gluster_replica1_mount_options(self):
Line 93:         def glusterVolumeInfo(volname=None, volfileServer=None):


https://gerrit.ovirt.org/#/c/40665/17/vdsm/storage/storageServer.py
File vdsm/storage/storageServer.py:

Line 302:         servers = [brick.split(":")[0]
Line 303:                    for brick in volInfo[volname]['bricks']]
Line 304:         servers.remove(volfileServer)
Line 305:         if not servers:
Line 306:             return ""
Please add empty line when you break the normal flow - same way you handle user 
options above.
Line 307:         return "backup-volfile-servers=" + ":".join(servers)
Line 308: 
Line 309: 
Line 310: class NFSConnection(object):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2478a5edc1fc9d24eb96d64a32a98a2467ce2989
Gerrit-PatchSet: 17
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Ala Hino <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Darshan N <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to