Freddy Rolland has posted comments on this change. Change subject: hsm: Add refreshPV verb ......................................................................
Patch Set 2: (7 comments) https://gerrit.ovirt.org/#/c/39528/2//COMMIT_MSG Commit Message: Line 5: CommitDate: 2015-04-05 12:08:18 +0300 Line 6: Line 7: hsm: Add refreshPV verb Line 8: Line 9: In case the LUN was increased on storage server and after that the > See the comment in lvm.refreshPV about this text. Done Line 10: multipath devices and the PV have been resized , Line 11: the PV info in the lVM cache needs to updated. Line 12: Line 13: This command invalidate the LVM cache of the supplied PV https://gerrit.ovirt.org/#/c/39528/2/vdsm/storage/hsm.py File vdsm/storage/hsm.py: Line 2112: :param guid: PV UUID to refresh size. Line 2113: :type guid: UUID Line 2114: :param options: unused Line 2115: :returns: Line 2116: :rtype: > This does not return anything, no need for :returns: and :rtype: Done Line 2117: """ Line 2118: lvm.refreshPV(guid) Line 2119: Line 2120: return Line 2116: :rtype: Line 2117: """ Line 2118: lvm.refreshPV(guid) Line 2119: Line 2120: return > There is no need to return nothing. Done Line 2121: Line 2122: @public Line 2123: def getDevicesVisibility(self, guids, options=None): Line 2124: """ https://gerrit.ovirt.org/#/c/39528/2/vdsm/storage/lvm.py File vdsm/storage/lvm.py: Line 881: _lvminfo._invalidatepvs(pvName) Line 882: _lvminfo._invalidatevgs(vgName) Line 883: Line 884: Line 885: def refreshPV(guid): > We don't have the concept of "refresh" in this module, and we already have Done Line 886: """ Line 887: In case the LUN was increased on storage server, after that the multipath Line 888: devices and the PV have been resized , the PV info in the lVM cache Line 889: needs to updated Line 883: Line 884: Line 885: def refreshPV(guid): Line 886: """ Line 887: In case the LUN was increased on storage server, after that the multipath > "was increased on storage server" -> "was enlarged on the storage server" Done Line 888: devices and the PV have been resized , the PV info in the lVM cache Line 889: needs to updated Line 890: Line 891: """ Line 891: """ Line 892: pvName = _fqpvname(guid) Line 893: pv = getPV(pvName) Line 894: if not pv: Line 895: raise se.PhysicalVolumeDoesNotExist(pvName) > getPV is raising se.InaccessiblePhysDev, no need to check the result and ra Done Line 896: vgName = pv.vg_name Line 897: _lvminfo._invalidatepvs(pvName) Line 898: _lvminfo._invalidatevgs(vgName) Line 899: return https://gerrit.ovirt.org/#/c/39528/2/vdsm/storage/storage_exception.py File vdsm/storage/storage_exception.py: Line 1524: class PhysicalVolumeDoesNotExist(StorageException): Line 1525: def __init__(self, pvname): Line 1526: self.value = "pvname=%s" % pvname Line 1527: code = 616 Line 1528: message = "Physical Volume does not exist" > Not needed, we use InaccessiblePhysDev for this. This error is nicer, but t Done Line 1529: Line 1530: Line 1531: ################################################# Line 1532: # SPM/HSM Exceptions -- To view, visit https://gerrit.ovirt.org/39528 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I51139bd556cd3eb3b50c496d3c25a86bb2a09e72 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Freddy Rolland <froll...@redhat.com> Gerrit-Reviewer: Fred Rolland <froll...@redhat.com> Gerrit-Reviewer: Freddy Rolland <froll...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches