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

Federico Simoncelli fsimonce at redhat.com
Thu Jan 2 11:27:00 UTC 2014


Federico Simoncelli has posted comments on this change.

Change subject: sp: refresh metadata on hsm when listing domains
......................................................................


Patch Set 4:

(3 comments)

....................................................
Commit Message
Line 3: AuthorDate: 2013-11-27 06:32:14 -0500
Line 4: Commit:     Federico Simoncelli <fsimonce at redhat.com>
Line 5: CommitDate: 2013-12-06 12:10:20 -0500
Line 6: 
Line 7: sp: refresh metadata on hsm when listing domains
This is part of the pool-no-md topic, and it's used to encapsulate the metadata operations.
Line 8: 
Line 9: In this patch:
Line 10: - validatePoolSD and validateAttachedDomain are relevant only for SPM
Line 11:   operations (remove @unsecured)


....................................................
File vdsm/storage/sp.py
Line 535:         with poolMeta.transaction():
Line 536:             poolMeta[PMDK_MASTER_VER] = masterVersion
Line 537:             domain.changeRole(role)
Line 538: 
Line 539:     # TODO: Remove or rename this function.
validatePoolSD is used to check if a storage domain is part of the pool in order to do some SPM operation. As we know HSM doesn't care if a storage domain is part of the pool or not. Marking this as "secure" will ring a bell for anyone trying to add an HSM verb that checks if the domain is part of the pool.
Line 540:     def validatePoolSD(self, sdUUID):
Line 541:         if sdUUID not in self.getDomains():
Line 542:             raise se.StorageDomainNotMemberOfPool(self.spUUID, sdUUID)
Line 543:         return True


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):
We don't have more invalidations, now that this is an SPM verb the validation is prevented by invalidateMetadata (smart enough to skip the invalidation for the SPM).
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