Allon Mureinik has posted comments on this change.

Change subject: fencing: Introduce getHostStatus internal API
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.ovirt.org/#/c/28873/1/vdsm/storage/clusterlock.py
File vdsm/storage/clusterlock.py:

Line 91:     def hasHostId(self, hostId):
Line 92:         return True
Line 93: 
Line 94:     def getHostStatus(self, hostId):
Line 95:         return sanlock.HOST_UNKNOWN
Not sure if returning a sanlock constant in a non-snalock implementation is a 
good idea...
Line 96: 
Line 97:     def acquire(self, hostID):
Line 98:         leaseTimeMs = self._leaseTimeSec * 1000
Line 99:         ioOpTimeoutMs = self._ioOpTimeoutSec * 1000


Line 229:                 return False
Line 230: 
Line 231:     def getHostStatus(self, hostId):
Line 232:         try:
Line 233:             # Note: get_hosts has of-by-one bug when asking for 
particular host
you probably mean "off-by-one", no?
Line 234:             # id, so get all and filter.
Line 235:             hosts = sanlock.get_hosts(self._sdUUID)
Line 236:         except sanlock.SanlockException as e:
Line 237:             self.log.debug("Error getting host status: %s", e)


Line 374:             currentHostId, lockFile = self._getLease()
Line 375:             return currentHostId == hostId
Line 376: 
Line 377:     def getHostStatus(self, hostId):
Line 378:         return sanlock.HOST_UNKNOWN
same comment here about non-sanlock impl
Line 379: 
Line 380:     def acquire(self, hostId):
Line 381:         with self._globalLockMapSync:
Line 382:             self.log.info("Acquiring local lock for domain %s (id: 
%s)",


http://gerrit.ovirt.org/#/c/28873/1/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 3615:                                       rm.LockType.exclusive):
Line 3616:             self.domainMonitor.stopMonitoring(sdUUID)
Line 3617: 
Line 3618:     @public
Line 3619:     def getHostStatus(self, hostId):
I really dislike this name. We have too many statuses wondering around the code.

How about "getHostStorageLiveliness" or something down those lines?
Line 3620:         """
Line 3621:         Returns host status on monitored domains.
Line 3622: 
Line 3623:         Warning: Internal use only.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iccd62e58a194aa0ceb0f5e2503b8ec7e4349971b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: [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