Change in vdsm[master]: volume: Log the correct error when creating a volume fails

nsoffer at redhat.com nsoffer at redhat.com
Tue Sep 23 20:05:43 UTC 2014


Nir Soffer has uploaded a new change for review.

Change subject: volume: Log the correct error when creating a volume fails
......................................................................

volume: Log the correct error when creating a volume fails

When a volume creation failed because of CannotCreateLogicalVolume
exception, we used to lie and log "volume already exists". This log
confused and wasted many developers hours. Now we log the exception
value instead.

Change-Id: I603b055658950dae5ccc3806b8b7a9e53762c5ef
Relates-To: https://bugzilla.redhat.com/1142710
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M vdsm/storage/volume.py
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/33301/1

diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index 13bd256..75fa1c4 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -434,8 +434,7 @@
                                      preallocate, volParent, srcImgUUID,
                                      srcVolUUID, volPath)
             except (se.VolumeAlreadyExists, se.CannotCreateLogicalVolume) as e:
-                cls.log.error("Failed to create volume: %s, volume already "
-                              "exists", volPath)
+                cls.log.error("Failed to create volume %s: %s", volPath, e)
                 vars.task.popRecovery()
                 raise e
             # When the volume format is raw what the guest sees is the apparent


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I603b055658950dae5ccc3806b8b7a9e53762c5ef
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list