Change in vdsm[master]: sp: split metadata transaction in createMaster
Federico Simoncelli
fsimonce at redhat.com
Tue Dec 24 10:34:19 UTC 2013
Federico Simoncelli has posted comments on this change.
Change subject: sp: split metadata transaction in createMaster
......................................................................
Patch Set 2:
(4 comments)
....................................................
Commit Message
Line 21: The two side effects of this change are:
Line 22: - we always initialize the pool metadata even when the domain metadata
Line 23: transaction fails
Line 24: - the createMaster operation takes now two storage operations instead
Line 25: of one
For what I understand now the pool and domain DictValidator are based on the same PersistentDict therefore they indeed were sharing the same transaction.
Line 26:
Line 27: Change-Id: I3b22af92b1f9a481be9af844b1acc47ae513d078
....................................................
File vdsm/storage/sd.py
Line 771: pools = self.getPools()
Line 772:
Line 773: if len(pools) > 0:
Line 774: self.log.info('initializing master domain %s detaching pools %s',
Line 775: self.sdUUID, ', '.join((str(x) for x in pools)))
I am maintaining the old behavior. I think that this is used during reconstructMaster to force the use of a domain that once was part of another pool. Either we continue to trust the engine or we prevent this potentially risky operation.
Line 776:
Line 777: with self._metadata.transaction():
Line 778: self.changeLeaseParams(leaseParams)
Line 779: self.setMetaParam(DMDK_POOLS, [spUUID])
....................................................
File vdsm/storage/sp.py
Line 722:
Line 723: if not misc.isAscii(poolName) and not domain.supportsUnicode():
Line 724: raise se.UnicodeArgumentException()
Line 725:
Line 726: self.initMasterDomain(domain, poolName, masterVersion)
oops, fixing
Line 727: domain.initMaster(self.spUUID, leaseParams)
Line 728:
Line 729: @unsecured
Line 730: def reconstructMaster(self, hostId, poolName, msdUUID, domDict,
Line 723: if not misc.isAscii(poolName) and not domain.supportsUnicode():
Line 724: raise se.UnicodeArgumentException()
Line 725:
Line 726: self.initMasterDomain(domain, poolName, masterVersion)
Line 727: domain.initMaster(self.spUUID, leaseParams)
I don't like the name similarity here. Suggestions?
Line 728:
Line 729: @unsecured
Line 730: def reconstructMaster(self, hostId, poolName, msdUUID, domDict,
Line 731: masterVersion, leaseParams):
--
To view, visit http://gerrit.ovirt.org/22418
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I3b22af92b1f9a481be9af844b1acc47ae513d078
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list