Eduardo has posted comments on this change.
Change subject: Read pool metadata once in StoragePool.getInfo() ......................................................................
Patch Set 2: (2 inline comments)
.................................................... File vdsm/storage/sp.py Line 1474: self.log.error("Couldn't read from master domain", exc_info=True) Line 1475: raise se.StoragePoolMasterNotFound(self.spUUID, msdUUID) Line 1476: Line 1477: try: Line 1478: pmd = self._getPoolMD(self.masterDomain) Simply a style question.
_metadata is defined property and should be used pmd = self._metadata.
I think this is a bit obscure, and redundant, since a function is called, making hard to understand if this metadata is a member of the pool object or it will be read from storage.
I dislike using decorators this way. Line 1479: except Exception: Line 1480: self.log.error("Pool metadata error", exc_info=True) Line 1481: raise se.StoragePoolActionError(self.spUUID) Line 1482:
Line 1482: Line 1483: poolInfo = { Line 1484: 'type': msdInfo['type'], Line 1485: 'name': pmd[PMDK_POOL_DESCRIPTION], Line 1486: 'domains': domainListEncoder(pmd[PMDK_DOMAINS].iteritems()), Done Line 1487: 'master_uuid': msdUUID, Line 1488: 'master_ver': pmd[PMDK_MASTER_VER], Line 1489: 'lver': pmd[PMDK_LVER], Line 1490: 'spm_id': pmd[PMDK_SPM_ID],
-- To view, visit http://gerrit.ovirt.org/14672 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I41a79662a4bd01fc310aa5554c38a16f3f8ba546 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Daniel Paikov paikov@gmail.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Vered Volansky vvolansk@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server