Federico Simoncelli 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
Because next call is getDomains. As you see on HSM (@unsecured) we were trying 
to remember to invalidateMetadata before calling getDomains (to get the correct 
data).


Line 160:         self.setMetaParams(metaParams, __securityOverride=True)
Line 161: 
Line 162:     @unsecured
Line 163:     def getDomainsMap(self):
Line 164:         self.invalidateMetadata()
An accessor should return the correct information. On HSM it reads the most 
updated information from the storage, and on SPM it (correctly) returns the 
cached data (invalidateMetadata is ignored).
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):
I addressed this in my previous comment.
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

Reply via email to