Change in vdsm[master]: domainMonitor: Fix unsafe iteration of domain monitor status

ykleinbe at redhat.com ykleinbe at redhat.com
Sun Jun 22 12:36:49 UTC 2014


Yoav Kleinberger has posted comments on this change.

Change subject: domainMonitor: Fix unsafe iteration of domain monitor status
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/29009/1/vdsm/storage/domainMonitor.py
File vdsm/storage/domainMonitor.py:

Line 119
Line 120
Line 121
Line 122
Line 123
> getStatus was used to get one domain status, we are returning here all doma
the object you call getStatus on gives you the proper context to understand the meaning of "getStatus".

Look at the usage of getMonitoredDomainsStatus - the domainMonitor object clarifies that you get the status for the monitored domains. 

the same goes for this bit: it's clear that you get the status of a single domain.


Line 118: 
Line 119:         del self._domains[sdUUID]
Line 120: 
Line 121:     def getMonitoredDomainsStatus(self):
Line 122:         for sdUUID, monitor in self._domains.items():
> The list you get is valid for the time you ask about it, and this is the li
OK
Line 123:             yield sdUUID, monitor.getStatus()
Line 124: 
Line 125:     def close(self):
Line 126:         self.log.info("Stopping domain monitors")


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I083c4b1925ee529c0993a291cad6076539d4ea66
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Xavi Francisco <xfrancis at redhat.com>
Gerrit-Reviewer: Yoav Kleinberger <ykleinbe at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list