Dan Kenigsberg has posted comments on this change.
Change subject: Adding [start|stop]MonitoringDomain(). ......................................................................
Patch Set 1:
(1 comment)
.................................................... File vdsm/storage/sp.py Line 1545: # {sdUUID1: status1, sdUUID2: status2, ...} Line 1546: self.invalidateMetadata() Line 1547: poolDoms = self.getDomains() Line 1548: activeDomains = tuple(sdUUID for sdUUID in poolDoms Line 1549: if poolDoms[sdUUID] == sd.DOM_ACTIVE_STATUS) I think that Eduardo is saying that we must not iterate over all monitoredDomains, but only on those connected to the pool. Hence
poolDoms = self.getDomains()
is required, and to avoid races (and added metadata reads), a repeated call with
activeOnly=True
should not be used. Line 1550: monitoredDomains = self.domainMonitor.monitoredDomains Line 1551: Line 1552: for sdUUID in poolDoms: Line 1553: if sdUUID not in activeDomains: