Change in vdsm[master]: gluster: Don't fail connect server when getting volume info

nsoffer at redhat.com nsoffer at redhat.com
Tue Mar 1 20:52:13 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: gluster: Don't fail connect server when getting volume info
......................................................................


Patch Set 8:

(3 comments)

https://gerrit.ovirt.org/#/c/53785/8/vdsm/storage/storageServer.py
File vdsm/storage/storageServer.py:

Line 352: 
Line 353:         replicaCount = self.volinfo['replicaCount']
Line 354:         if replicaCount not in self.ALLOWED_REPLICA_COUNTS:
Line 355:             self.log.warning("Unsupported replica count (%s) for volume "
Line 356:                              " %r, please upgrade volume to replica 3",
This change is not related and seems unneeded. Please separate it to anther patch if you think it is needed.
Line 357:                              replicaCount, self._volname)
Line 358: 
Line 359:     def _get_backup_servers_option(self):
Line 360:         if not self.volinfo:


Line 357:                              replicaCount, self._volname)
Line 358: 
Line 359:     def _get_backup_servers_option(self):
Line 360:         if not self.volinfo:
Line 361:             return
This must return a string. None may work by accident, but it is not correct.
Line 362: 
Line 363:         servers = utils.unique(brick.split(":")[0] for brick
Line 364:                                in self.volinfo['bricks'])
Line 365:         self.log.debug("Using bricks: %s", servers)


Line 382:                                                        self._volfileserver)
Line 383:             return volinfo[self._volname]
Line 384:         except ge.GlusterCmdExecFailedException as e:
Line 385:             self.log.warning("Failed to get volume info. %s",
Line 386:                              e)
Use our standard format:

    self.log.warning("Failed to get volume info: %s", e)

And it also fits in one line.
Line 387:             return {}
Line 388: 
Line 389: 
Line 390: class NFSConnection(object):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0e1835b7de4c5c4c5c4616d3c36f15c1f91a01dc
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list