Eduardo has uploaded a new change for review.

Change subject: Avoid redundant check for volume create rollback.
......................................................................

Avoid redundant check for volume create rollback.

The same check will be called during volume delete.
In addition removing createVolumeRollbackError, code 228.

Change-Id: I77e9a1e6c38cbd35f99aecf1422d874fff21449b
Related-to: BZ#960952
Signed-off-by: Eduardo <[email protected]>
---
M vdsm/storage/storage_exception.py
M vdsm/storage/volume.py
2 files changed, 3 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/64/15764/1

diff --git a/vdsm/storage/storage_exception.py 
b/vdsm/storage/storage_exception.py
index ed2566b..92cf9b8 100644
--- a/vdsm/storage/storage_exception.py
+++ b/vdsm/storage/storage_exception.py
@@ -304,9 +304,9 @@
     message = "Cannot prepare illegal volume"
 
 
-class createVolumeRollbackError(StorageException):
-    code = 228
-    message = "Failure create volume rollback"
+# class createVolumeRollbackError(StorageException):
+#     code = 228
+#     message = "Failure create volume rollback"
 
 
 class createVolumeSizeError(StorageException):
diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index 36e8d30..1c81d87 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -371,9 +371,6 @@
                      "volUUID=%s imageDir=%s" %
                      (repoPath, sdUUID, imgUUID, volUUID, imageDir))
         vol = sdCache.produce(sdUUID).produceVolume(imgUUID, volUUID)
-        # Avoid rollback if volume has children
-        if len(vol.getChildrenList()):
-            raise se.createVolumeRollbackError(volUUID)
         pvol = vol.getParentVolume()
         # Remove volume
         vol.delete(postZero=False, force=True)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77e9a1e6c38cbd35f99aecf1422d874fff21449b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to