Change in vdsm[master]: pool: live storage migration implementation

smizrahi at redhat.com smizrahi at redhat.com
Wed Oct 10 13:37:24 UTC 2012


Saggi Mizrahi has posted comments on this change.

Change subject: pool: live storage migration implementation
......................................................................


Patch Set 11: I would prefer that you didn't submit this

(4 inline comments)

....................................................
File vdsm/storage/hsm.py
Line 1355:         srcDom = self.validateSdUUID(sdUUID)
Line 1356:         dstDom = self.validateSdUUID(dstSdUUID)
Line 1357: 
Line 1358:         # Do not validate images in Backup domain
Line 1359:         if not sdCache.produce(dstSdUUID).isBackup():
isn't dstDom already produced?
Line 1360:             self.validateImageMove(srcDom, dstDom, imgUUID)
Line 1361: 
Line 1362:         for dom in sorted((sdUUID, dstSdUUID)):
Line 1363:             vars.task.getSharedLock(STORAGE, dom)


....................................................
File vdsm/storage/image.py
Line 647:         self.log.info("%s task on image %s was successfully finished", OP_TYPES[op], imgUUID)
Line 648:         return True
Line 649: 
Line 650:     def _syncExecute(self, srcDom, imgUUID, dstDom, excludeLeaf=False):
Line 651:         chains = {
it might be more readable to have
dstChain = X
srcChain = y

and when you pass it along just create the dict for the parameter

This helps pyflakes detect typos and other silly mistakes
Line 652:             'srcChain': self.getChain(srcDom.sdUUID, imgUUID),
Line 653:             'dstChain': self.getChain(dstDom.sdUUID, imgUUID),
Line 654:         }
Line 655: 


Line 673:         self._finalizeDestinationImage(dstDom, imgUUID, chains, False)
Line 674: 
Line 675:     def sync(self, sdUUID, imgUUID, dstSdUUID, operations):
Line 676:         srcDom = sdCache.produce(sdUUID)
Line 677:         dstDom = sdCache.produce(dstSdUUID)
Why keep on producing? Lets not make things worse then they already are.
Line 678: 
Line 679:         if operations.get('prepare', False):
Line 680:             # NOTE: eventually we could try to consider the excludeLeaf
Line 681:             # option here too. At the time of this writing there are no


....................................................
File vdsm/storage/sp.py
Line 1751: 
Line 1752:         srcImgResNs = sd.getNamespace(sdUUID, IMAGE_NAMESPACE)
Line 1753:         dstImgResNs = sd.getNamespace(dstSdUUID, IMAGE_NAMESPACE)
Line 1754: 
Line 1755:         with nested(rmanager.acquireResource(srcImgResNs,
Does this need sorting to prevent deadlock?
Line 1756:                                              imgUUID, rm.LockType.shared),
Line 1757:                     rmanager.acquireResource(dstImgResNs,
Line 1758:                                              imgUUID, rm.LockType.exclusive)):
Line 1759:             image.Image(repoPath).sync(sdUUID, imgUUID, dstSdUUID, operations)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I91e641cb1d25feb8a406aa7ad07415587a7ac290
Gerrit-PatchSet: 11
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: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
Gerrit-Reviewer: Shu Ming <shuming at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list