[NEW PATCH] Related to BZ#732416 - Unify criteria for active LV in lvm cache. (via gerrit-bot)

Eduardo Warszawski ewarszaw at redhat.com
Wed Aug 31 11:52:36 UTC 2011


New patch submitted by Eduardo Warszawski (ewarszaw at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/873

commit a9eeef14fb9f786336d3d04bdf6f367af0e6147e
Author: Eduardo Warszawski <ewarszaw at redhat.com>
Date:   Wed Aug 24 21:38:39 2011 +0300

    Related to BZ#732416 - Unify criteria for active LV in lvm cache.
    
    Change-Id: I91506ed397512e51ba5560fbb617e853668ebc0e

diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index 921cf3b..ca90329 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -981,11 +981,10 @@ def createLV(vgName, lvName, size, activate=True, contiguous=False, initialTag=N
 
 def removeLV(vgName, lvName):
     #Assert that the LV is inactive before remove.
-    lv = _lvminfo._lvs.get((vgName, lvName), None)
-    if lv and not isinstance(lv, Stub) and lv.active:
+    if os.path.exists(lvPath(vgName, lvName)):
         #Fix me
         #Should not remove active LVs
-        #raise se.CannotRemoveLogicalVolume(vg, lv)
+        #raise se.CannotRemoveLogicalVolume(vgName, lvName)
         log.warning("Removing active volume %s/%s" % (vgName, lvName))
 
     #LV exists or not in cache, attempting to remove it.




More information about the vdsm-patches mailing list