Change in vdsm[master]: sp: refresh metadata on hsm when listing domains

nsoffer at redhat.com nsoffer at redhat.com
Thu Jan 2 18:08:58 UTC 2014


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 <fsimonce at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list