Ayal Baron has posted comments on this change.

Change subject: getAllTasksList\Status with spUUID retrieves info only if host 
is the SPM
......................................................................


Patch Set 22: I would prefer that you didn't submit this

(2 inline comments)

....................................................
File vdsm/storage/sp.py
Line 2105:     def getAllTasksStatuses(self):
Line 2106:         if self.lock.acquire(blocking=False):
Line 2107:             if self.spmRole == SPM_ACQUIRED:
Line 2108:                 try:
Line 2109:                     return self.taskMng.getAllTasksStatuses("spm")
again, you can delete everything in this function except for this line.
The rest is totally redundant.
The moment you moved the function into StoragePool class which inherits from 
Securable then you don't need to do all of this, it is immediately an SPM 
operation and if the host is not the SPM it will raise the relevant error.
Line 2110:                 finally:
Line 2111:                     self.lock.release()
Line 2112:             self.lock.release()
Line 2113:         raise se.SpmStatusError(self.spUUID)


Line 2112:             self.lock.release()
Line 2113:         raise se.SpmStatusError(self.spUUID)
Line 2114: 
Line 2115:     def getAllTasksInfo(self):
Line 2116:         if self.lock.acquire(blocking=False):
same
Line 2117:             if self.spmRole == SPM_ACQUIRED:
Line 2118:                 try:
Line 2119:                     return  self.taskMng.getAllTasksInfo("spm")
Line 2120:                 finally:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4cbc11c924f0bd078749fea26d79b39c0dd48094
Gerrit-PatchSet: 22
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Daniel P. Berrange <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Shu Ming <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: liron aravot <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to