You are viewing a plain text version of this content. The canonical link for it is here.
Posted to tashi-commits@incubator.apache.org by rg...@apache.org on 2012/06/07 13:17:55 UTC
svn commit: r1347602 -
/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
Author: rgass
Date: Thu Jun 7 13:17:54 2012
New Revision: 1347602
URL: http://svn.apache.org/viewvc?rev=1347602&view=rev
Log:
Only remove the logical volumn that the virtual machine created instead of blasting the entire volumn group.
Modified:
incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1347602&r1=1347601&r2=1347602&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Thu Jun 7 13:17:54 2012
@@ -220,8 +220,9 @@ class Qemu(VmControlInterface):
# remove scratch storage
try:
if self.scratchVg is not None:
- log.info("Removing any scratch for %s" % (name))
- cmd = "/sbin/lvremove --quiet -f %s" % self.scratchVg
+ scratchName = "lv%s" % name
+ log.info("Removing any scratch for %s" % (scratchName))
+ cmd = "/sbin/lvremove --quiet -f %s/%s" % (self.scratchVg, scratchName)
result = subprocess.Popen(cmd.split(), executable=cmd.split()[0], stdout=subprocess.PIPE, stderr=open(os.devnull, "w"), close_fds=True).wait()
except:
log.warning("Problem cleaning scratch volumes")