Change in vdsm[master]: sp: refactor out the metadata access from StoragePool

abaron at redhat.com abaron at redhat.com
Wed Jan 15 10:05:19 UTC 2014


Ayal Baron has posted comments on this change.

Change subject: sp: refactor out the metadata access from StoragePool
......................................................................


Patch Set 2:

(3 comments)

http://gerrit.ovirt.org/#/c/22132/2/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 600:     @staticmethod
Line 601:     def _getSpmStatusInfo(pool):
Line 602:         return dict(
Line 603:             zip(('spmStatus', 'spmLver', 'spmId'),
Line 604:                 (pool.spmRole,) + pool.getBackend().getSpmStatus()))
why is getSpmStatus not wrapped by the pool? (i.e. instead of calling getBackend here, leave as is and expose getSpmStatus in pool object
Line 605: 
Line 606:     @public
Line 607:     def getSpmStatus(self, spUUID, options=None):
Line 608:         pool = self.getPool(spUUID)


Line 1035:                 self._updateStoragePool(pool, hostID, msdUUID, masterVersion)
Line 1036:                 return True
Line 1037: 
Line 1038:             pool = sp.StoragePool(spUUID, self.domainMonitor, self.taskMng)
Line 1039:             pool.backend = spbackends.StoragePoolMetaBackend(pool)
why is this not set in __init__? (see same comment in next patch since once domainsMap is passed then it is easy to pass that to pool object ctor and determine backend type accordingly
Line 1040: 
Line 1041:             # Must register domain state change callbacks *before* connecting
Line 1042:             # the pool, which starts domain monitor threads. Otherwise we will
Line 1043:             # miss the first event from the monitor thread.


Line 1821:                 sd.validateSDStatus(status)
Line 1822:             except:
Line 1823:                 domDict[d] = sd.validateSDDeprecatedStatus(status)
Line 1824: 
Line 1825:         return pool.getBackend().reconstructMaster(
again, expose reconstructMaster in pool object?
Line 1826:             hostId, poolName, masterDom, domDict, masterVersion, leaseParams)
Line 1827: 
Line 1828:     def _logResp_getDeviceList(self, response):
Line 1829:         logableDevs = deepcopy(response)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I75493d1db60e51cccd5231b516f963c970d24c99
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list