Change in vdsm[master]: Remove redundant check that causes lvm cache to refresh ever...
ykaplan at redhat.com
ykaplan at redhat.com
Mon Aug 19 06:33:49 UTC 2013
Yeela Kaplan has uploaded a new change for review.
Change subject: Remove redundant check that causes lvm cache to refresh every volume creation
......................................................................
Remove redundant check that causes lvm cache to refresh every volume creation
Change-Id: Ib6f3b6ca8313070d0345b5f76ebb0b3d9772d14f
Signed-off-by: Yeela Kaplan <ykaplan at redhat.com>
---
M vdsm/storage/lvm.py
M vdsm/storage/volume.py
2 files changed, 4 insertions(+), 16 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/18274/1
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index bc9d30c..96b1acd 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -463,6 +463,8 @@
log.warning("Removing stale lv: %s/%s", vgName, lvName)
self._lvs.pop((vgName, lvName), None)
+ log.debug("Finished lvs reload")
+
return updatedLVs
def _reloadAllLvs(self):
diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index 014f733..5f90b1f 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -399,19 +399,10 @@
'srcImgUUID' - source image UUID
'srcVolUUID' - source volume UUID
"""
- # Validate volume parameters should be checked here for all
- # internal flows using volume creation.
- misc.validateUUID(sdUUID, "sdUUID", False)
- misc.validateUUID(imgUUID, "imgUUID", False)
- misc.validateUUID(srcImgUUID, "srcImgUUID", True)
- misc.validateUUID(srcVolUUID, "srcVolUUID", True)
cls.validateCreateVolumeParams(volFormat, preallocate, srcVolUUID)
dom = sdCache.produce(sdUUID)
imgPath = image.Image(repoPath).create(sdUUID, imgUUID)
-
- if dom.volumeExists(imgPath, volUUID):
- raise se.VolumeAlreadyExists(volUUID)
volPath = os.path.join(imgPath, volUUID)
volParent = None
@@ -429,17 +420,12 @@
srcImgUUID = imgUUID
volParent = cls(repoPath, sdUUID, srcImgUUID, srcVolUUID)
-
- if not volParent.isLegal():
- raise se.createIllegalVolumeSnapshotError(
- volParent.volUUID)
+ # Override the size with the size of the parent
+ size = volParent.getSize()
if imgUUID != srcImgUUID:
volParent.share(imgPath)
volParent = cls(repoPath, sdUUID, imgUUID, srcVolUUID)
-
- # Override the size with the size of the parent
- size = volParent.getSize()
except se.StorageException:
cls.log.error("Unexpected error", exc_info=True)
--
To view, visit http://gerrit.ovirt.org/18274
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib6f3b6ca8313070d0345b5f76ebb0b3d9772d14f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
More information about the vdsm-patches
mailing list