Change in vdsm[master]: gluster: fix build error in F20 due to blivet version issue

tjeyasin at redhat.com tjeyasin at redhat.com
Fri Mar 20 09:02:54 UTC 2015


Timothy Asir has posted comments on this change.

Change subject: gluster: fix build error in F20 due to blivet version issue
......................................................................


Patch Set 5:

(3 comments)

https://gerrit.ovirt.org/#/c/38942/5/vdsm/gluster/storagedev.py
File vdsm/gluster/storagedev.py:

Line 246:     pvDeviceList = _createPV(pvDeviceList, alignment)
Line 247: 
Line 248:     supportSizeObj = True
Line 249:     stripeSize = raidParams.get('stripeSize', 0)
Line 250:     if isinstance(deviceList[0].size, size.Size):
> Why do you check first element of deviceList?
Because in lower version of blivet returns the device size as integer (in MiB)
whereas the latest version returns the size as an object.
Line 251:         if stripeSize:
Line 252:             stripeSize = size.Size('%s KiB' % stripeSize)
Line 253:     else:
Line 254:         supportSizeObj = False


Line 252:             stripeSize = size.Size('%s KiB' % stripeSize)
Line 253:     else:
Line 254:         supportSizeObj = False
Line 255:         stripeSize = stripeSize / 1024.0
Line 256:     vg = _createVG(vgName, pvDeviceList, stripeSize)
> Can't stripeSize be Size object here?
in latest blivet version LVMVolumeGroupDevice function needs size object whereas older one requires number.
Line 257: 
Line 258:     # The following calculation is based on the redhat storage performance doc
Line 259:     # http://docbuilder.usersys.redhat.com/22522
Line 260:     # /#chap-Configuring_Red_Hat_Storage_for_Enhancing_Performance


Line 277:             poolDataSize = size.Size('%d KiB' % poolDataSize)
Line 278:         else:
Line 279:             metaDataSize = metaDataSize / 1024.0
Line 280:             poolDataSize = poolDataSize / 1024.0
Line 281:     pool = _createThinPool(poolName, vg, chunkSize, metaDataSize, poolDataSize)
> Same as above.  Can't these size be Size objects?
in latest blivet version LVMLogicalVolumeDevice function needs size object whereas the older version one requires number.
Line 282:     thinlv = LVMThinLogicalVolumeDevice(brickName, parents=[pool],
Line 283:                                         size=pool.size, grow=True)
Line 284:     blivetEnv.createDevice(thinlv)
Line 285:     blivetEnv.doIt()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf2af69637b7d247225433a7736c49f6c5fefe1d
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <tjeyasin at redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Ramesh N <rnachimu at redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose at redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbonazzo 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