Liron Aravot has posted comments on this change. Change subject: StorageDomain.getInfo - report lvm metadata device for block sd ......................................................................
Patch Set 5: (8 comments) https://gerrit.ovirt.org/#/c/64433/5/lib/api/vdsm-api.yml File lib/api/vdsm-api.yml: Line 5659: type: string Line 5660: Line 5661: - defaultvalue: null Line 5662: description: The GUID of the device containing the domain lvm metadata (optional) Line 5663: name: lvmmetadatadevice > vgMetadataDevice Done Line 5664: type: string Line 5665: type: object Line 5666: Line 5667: StorageDomainStatus: &StorageDomainStatus https://gerrit.ovirt.org/#/c/64433/5/lib/vdsm/storage/exception.py File lib/vdsm/storage/exception.py: Line 1558: Line 1559: Line 1560: class CannotGetVGMetadataPV(StorageException): Line 1561: def __init__(self, vgname): Line 1562: self.value = "vgname=%s" % (vgname) > Expected one pv with pv metadata, vgname=%s, pvs=%s As this error is intended to be "general" - the code that raises will pass the exact error. Line 1563: code = 616 Line 1564: message = "Cannot get Volume Group metadata PV" Line 1565: Line 1566: https://gerrit.ovirt.org/#/c/64433/5/vdsm/storage/blockSD.py File vdsm/storage/blockSD.py: Line 1109 Line 1110 Line 1111 Line 1112 Line 1113 > Take this Done Line 1116: <<<<<<< HEAD Line 1117: info['metadatadevice'] = self._manifest.getMetadataLVDevice() Line 1118: ======= Line 1119: info['metadatadevice'] = self._manifest.getMetadataLVFirstDevice() Line 1120: info['lvmmetadatadevice'] = self._manifest.getVgMetadataDevice() > Use mixed case name, already used in this verb response. Done Line 1121: >>>>>>> 7da51c9... StorageDomain.getInfo - report lvm metadata device for block sd Line 1122: return info Line 1123: Line 1124: def getStats(self): https://gerrit.ovirt.org/#/c/64433/5/vdsm/storage/lvm.py File vdsm/storage/lvm.py: Line 585 Line 586 Line 587 Line 588 Line 589 > Let put the new method here, more specific. Done Line 502: def _invalidatevgs(self, vgNames): Line 503: vgNames = _normalizeargs(vgNames) Line 504: with self._lock: Line 505: for vgName in vgNames: Line 506: self._vgs[vgName] = aStub(vgName, True) > Not related. Done Line 507: Line 508: def _invalidateAllVgs(self): Line 509: with self._lock: Line 510: self._stalevg = True Line 555: reloaded = self._reloadpvs(stalepvs) Line 556: pvs.update(reloaded) Line 557: return pvs.values() Line 558: Line 559: def getVgPvs(self, vgName): > Add docsting explaining this new function compared with getPv. Done Line 560: stalepvs = [] Line 561: vgpvs = [] Line 562: vg = self.getVg(vgName) Line 563: for pvName in vg.pv_name: Line 1337: def getVgMetadataPv(vgName): Line 1338: pvs = _lvminfo.getVgPvs(vgName) Line 1339: mdpvs = [pv for pv in pvs if not isinstance(pv, Stub) and _isMetadataPv(pv)] Line 1340: if len(mdpvs) != 1: Line 1341: se.CannotGetVGMetadataPV(vgName) > "Expected one metadata pv in vg: %s, found: %s" % (vg.name, pvs) Done Line 1342: return mdpvs[0] Line 1343: Line 1344: def _isMetadataPv(pv): Line 1345: """ -- To view, visit https://gerrit.ovirt.org/64433 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4a7763d2ab7d796be633ecd69f661cba96e29dde Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Liron Aravot <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list -- [email protected] To unsubscribe send an email to [email protected]
