Nir Soffer has posted comments on this change. Change subject: sp: refresh metadata on hsm when listing domains ......................................................................
Patch Set 4: (3 comments) .................................................... File vdsm/storage/sp.py Line 1540 Line 1541 Line 1542 Line 1543 Line 1544 It starts making sense now - previously we had to invoke invalidateMetaData before calling getDomains(), and now getDomainsMap ensure that getDomains always return up to date data? Line 160: self.setMetaParams(metaParams, __securityOverride=True) Line 161: Line 162: @unsecured Line 163: def getDomainsMap(self): Line 164: self.invalidateMetadata() Before this patch we were not invalidating meta data before calling self.getMetaParam() did we? We should rename invalidateMetaData to invalidateMetaDataIfNeeded. This method must have documentation that explain this unexpected behavior. Line 165: return self.getMetaParam(PMDK_DOMAINS) Line 166: Line 167: def setDomainsMap(self, domains): Line 168: self.setMetaParam(PMDK_DOMAINS, domains) Line 536: poolMeta[PMDK_MASTER_VER] = masterVersion Line 537: domain.changeRole(role) Line 538: Line 539: # TODO: Remove or rename this function. Line 540: def validatePoolSD(self, sdUUID): So you suggest that previous code was wrong, not invalidating the meta data when accessing the domains map? Line 541: if sdUUID not in self.getDomains(): Line 542: raise se.StorageDomainNotMemberOfPool(self.spUUID, sdUUID) Line 543: return True Line 544: -- To view, visit http://gerrit.ovirt.org/21786 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I095cd0760076fb4be97a776498af78a40ff84112 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Ayal Baron <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Eduardo <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Sergey Gotliv <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
