Ayal Baron has posted comments on this change.

Change subject: sp: turn spm status attributes private
......................................................................


Patch Set 2:

(4 comments)

....................................................
Commit Message
Line 3: AuthorDate: 2013-11-21 12:26:08 -0500
Line 4: Commit:     Federico Simoncelli <[email protected]>
Line 5: CommitDate: 2013-11-22 11:40:14 -0500
Line 6: 
Line 7: sp: turn spm status attributes private
why?
Line 8: 
Line 9: Change-Id: I3b71349e2a0dfc453b68cd2d9ca6c563b1bee90c


....................................................
File vdsm/storage/hsm.py
Line 305:         except se.StorageDomainDoesNotExist:
Line 306:             pass
Line 307: 
Line 308:     def validateSPM(self, pool):
Line 309:         if pool.isSpmRoleAcquired():
this is the reverse logic.
validateSPM should return True if acquired
Line 310:             raise se.SpmStatusError(pool.spUUID)
Line 311: 
Line 312:     def validateNotSPM(self, pool):
Line 313:         if not pool.isSpmRoleFree():


....................................................
File vdsm/storage/sp.py
Line 138:         return self.getMetaParam(PMDK_LVER)
Line 139: 
Line 140:     @unsecured
Line 141:     def getSpmStatus(self):
Line 142:         return self._spmRole, self._getSpmLver(), self._getSpmId()
not caused by this patch but, getSpmLver and getSpmId get eh domain metadata 
twice.
1. it's not efficient
2. it might change between calls
possibly worth fixing (either here or in a subsequent patch)
Line 143: 
Line 144:     @unsecured
Line 145:     def isSpmRoleAcquired(self):
Line 146:         return self._spmRole == SPM_ACQUIRED


Line 141:     def getSpmStatus(self):
Line 142:         return self._spmRole, self._getSpmLver(), self._getSpmId()
Line 143: 
Line 144:     @unsecured
Line 145:     def isSpmRoleAcquired(self):
s/isSpmRolAcquired/isSpmAcquired/ ?

if 'yes' then same for isSpmRoleFree
Line 146:         return self._spmRole == SPM_ACQUIRED
Line 147: 
Line 148:     @unsecured
Line 149:     def isSpmRoleFree(self):


-- 
To view, visit http://gerrit.ovirt.org/21527
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3b71349e2a0dfc453b68cd2d9ca6c563b1bee90c
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Ayal Baron <[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