Change in vdsm[master]: multipath.getMPDevNamesIter() return /dev/mapper.

abaron at redhat.com abaron at redhat.com
Thu Aug 29 05:37:08 UTC 2013


Ayal Baron has posted comments on this change.

Change subject: multipath.getMPDevNamesIter() return /dev/mapper.
......................................................................


Patch Set 1:

(2 comments)

....................................................
File vdsm/storage/lvm.py
Line 127: USER_DEV_LIST = filter(None, config.get("irs", "lvm_dev_whitelist").split(","))
Line 128: 
Line 129: 
Line 130: def _buildFilter(devices):
Line 131:     strippeds = sorted(set(d.strip() for d in devices))
s/strippeds/devs/
strippeds is meaningless and this is a sorted set of devices after they've been stripped, of all the properties, 'stripped' is the least important I'd say.
Line 132:     strippeds.discard('')  # Who has put a blank here?
Line 133:     dmPaths = [dev.replace(r'\x', r'\\x') for dev in strippeds]
Line 134:     filt = '|'.join(dmPaths)
Line 135:     if len(filt) > 0:


Line 129: 
Line 130: def _buildFilter(devices):
Line 131:     strippeds = sorted(set(d.strip() for d in devices))
Line 132:     strippeds.discard('')  # Who has put a blank here?
Line 133:     dmPaths = [dev.replace(r'\x', r'\\x') for dev in strippeds]
although it is the output, I'm not sure there is any guarantee that [x for x in y] will generate a sorted list if y is sorted.
To make this a non issue, just move sorted from above down here
Line 134:     filt = '|'.join(dmPaths)
Line 135:     if len(filt) > 0:
Line 136:         filt = "'a|" + filt + "|', "
Line 137: 


-- 
To view, visit http://gerrit.ovirt.org/17967
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1ec54147205992ac130684d01e73cd7aceccad48
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Elad Ben Aharon <eladba1990 at gmail.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list