Federico Simoncelli has uploaded a new change for review.
Change subject: sp: remove duplicated code for repoPath ......................................................................
sp: remove duplicated code for repoPath
Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Signed-off-by: Federico Simoncelli fsimonce@redhat.com --- M vdsm/storage/sp.py 1 file changed, 18 insertions(+), 24 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/12803/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py index 7a64bf5..0a84bc4 100644 --- a/vdsm/storage/sp.py +++ b/vdsm/storage/sp.py @@ -1074,14 +1074,14 @@ # broken after the upgrade sdUUID = domain.sdUUID isMsd = (self.masterDomain.sdUUID == sdUUID) - repoPath = os.path.join(self.storage_repository, self.spUUID)
if targetFormat is None: targetFormat = self.getFormat()
try: self._formatConverter.convert( - repoPath, self.id, domain.getRealDomain(), isMsd, targetFormat) + self.poolPath, self.id, domain.getRealDomain(), isMsd, + targetFormat) finally: # For safety we remove the domain from the cache also if the # conversion supposedly failed. @@ -1753,12 +1753,11 @@ rmanager.acquireResource(dstImageResourcesNamespace, dstImgUUID, rm.LockType.exclusive) ): - repoPath = os.path.join(self.storage_repository, self.spUUID) - dstUUID = image.Image(repoPath).copy(sdUUID, vmUUID, srcImgUUID, - srcVolUUID, dstImgUUID, - dstVolUUID, descr, dstSdUUID, - volType, volFormat, - preallocate, postZero, force) + dstUUID = image.Image(self.poolPath).copy( + sdUUID, vmUUID, srcImgUUID, srcVolUUID, dstImgUUID, + dstVolUUID, descr, dstSdUUID, volType, volFormat, preallocate, + postZero, force) + return dict(uuid=dstUUID)
def moveImage(self, srcDomUUID, dstDomUUID, imgUUID, vmUUID, op, postZero, @@ -1801,9 +1800,8 @@ imgUUID, srcLock), rmanager.acquireResource(dstImageResourcesNamespace, imgUUID, rm.LockType.exclusive)): - repoPath = os.path.join(self.storage_repository, self.spUUID) - image.Image(repoPath).move(srcDomUUID, dstDomUUID, imgUUID, vmUUID, - op, postZero, force) + image.Image(self.poolPath).move(srcDomUUID, dstDomUUID, imgUUID, + vmUUID, op, postZero, force)
def cloneImageStructure(self, sdUUID, imgUUID, dstSdUUID): """ @@ -1829,8 +1827,8 @@ )))
with nested(*resList): - repoPath = os.path.join(self.storage_repository, self.spUUID) - image.Image(repoPath).cloneStructure(sdUUID, imgUUID, dstSdUUID) + image.Image(self.poolPath).cloneStructure( + sdUUID, imgUUID, dstSdUUID)
def syncImageData(self, sdUUID, imgUUID, dstSdUUID, syncType): """ @@ -1857,9 +1855,8 @@ )))
with nested(*resList): - repoPath = os.path.join(self.storage_repository, self.spUUID) - image.Image(repoPath).syncData(sdUUID, imgUUID, dstSdUUID, - syncType) + image.Image(self.poolPath).syncData( + sdUUID, imgUUID, dstSdUUID, syncType)
def moveMultipleImages(self, srcDomUUID, dstDomUUID, imgDict, vmUUID, force): @@ -1896,9 +1893,8 @@ dstImageResourcesNamespace, imgUUID, rm.LockType.exclusive))
with nested(*resourceList): - repoPath = os.path.join(self.storage_repository, self.spUUID) - image.Image(repoPath).multiMove(srcDomUUID, dstDomUUID, imgDict, - vmUUID, force) + image.Image(self.poolPath).multiMove( + srcDomUUID, dstDomUUID, imgDict, vmUUID, force)
def mergeSnapshots(self, sdUUID, vmUUID, imgUUID, ancestor, successor, postZero): @@ -1923,9 +1919,8 @@
with rmanager.acquireResource(imageResourcesNamespace, imgUUID, rm.LockType.exclusive): - repoPath = os.path.join(self.storage_repository, self.spUUID) - image.Image(repoPath).merge(sdUUID, vmUUID, imgUUID, ancestor, - successor, postZero) + image.Image(self.poolPath).merge( + sdUUID, vmUUID, imgUUID, ancestor, successor, postZero)
def createVolume(self, sdUUID, imgUUID, size, volFormat, preallocate, diskType, volUUID=None, desc="", @@ -2096,8 +2091,7 @@ self.log.warning("SP %s SD %s img %s Vol %s - teardown failed")
def validateVolumeChain(self, sdUUID, imgUUID): - repoPath = os.path.join(self.storage_repository, self.spUUID) - image.Image(repoPath).validateVolumeChain(sdUUID, imgUUID) + image.Image(self.poolPath).validateVolumeChain(sdUUID, imgUUID)
def extendSD(self, sdUUID, devlist, force): sdCache.produce(sdUUID).extend(devlist, force)
-- To view, visit http://gerrit.ovirt.org/12803 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: sp: remove duplicated code for repoPath ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1497/ (1/2)
-- To view, visit http://gerrit.ovirt.org/12803 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: sp: remove duplicated code for repoPath ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1460/ (2/2)
-- To view, visit http://gerrit.ovirt.org/12803 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: sp: remove duplicated code for repoPath ......................................................................
Patch Set 1: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1497/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1460/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/12803 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: sp: remove duplicated code for repoPath ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1762/ (1/2)
-- To view, visit http://gerrit.ovirt.org/12803 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: sp: remove duplicated code for repoPath ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1712/ (2/2)
-- To view, visit http://gerrit.ovirt.org/12803 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: sp: remove duplicated code for repoPath ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1712/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1762/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/12803 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Ayal Baron has posted comments on this change.
Change subject: sp: remove duplicated code for repoPath ......................................................................
Patch Set 2: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/12803 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Yeela Kaplan has posted comments on this change.
Change subject: sp: remove duplicated code for repoPath ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
Cool! A very much needed patch!
-- To view, visit http://gerrit.ovirt.org/12803 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Federico Simoncelli has posted comments on this change.
Change subject: sp: remove duplicated code for repoPath ......................................................................
Patch Set 2: Verified
I've been running with this enabled since few weeks.
-- To view, visit http://gerrit.ovirt.org/12803 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: sp: remove duplicated code for repoPath ......................................................................
sp: remove duplicated code for repoPath
Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Signed-off-by: Federico Simoncelli fsimonce@redhat.com --- M vdsm/storage/sp.py 1 file changed, 18 insertions(+), 24 deletions(-)
Approvals: Ayal Baron: Looks good to me, approved Yeela Kaplan: Looks good to me, but someone else must approve Federico Simoncelli: Verified Dan Kenigsberg:
-- To view, visit http://gerrit.ovirt.org/12803 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: Id9e7160a0934f687d3f7b23de06f392ec9a3a9b7 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org