summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArata Notsu <notsu@virtualtech.jp>2013-02-19 20:59:20 +0900
committerArata Notsu <notsu@virtualtech.jp>2013-02-19 20:59:40 +0900
commite3fe55df23e496cee3f7b315a245ddcaaf9e8470 (patch)
treec71bebbf9479c9ddd0217f5325c7f82bb1b9b537
parent1b9b66ba210c1dd886a95d79e5621e13fb64aa3a (diff)
downloadnova-e3fe55df23e496cee3f7b315a245ddcaaf9e8470.tar.gz
nova-e3fe55df23e496cee3f7b315a245ddcaaf9e8470.tar.xz
nova-e3fe55df23e496cee3f7b315a245ddcaaf9e8470.zip
Fix leak of loop/nbd devices in injection using localfs
Call do_teardown() rather than do_umount() bug 1130080 Change-Id: I0dd4e4990f75917628007fd380f7df531d9a79e5
-rw-r--r--nova/virt/disk/mount/api.py4
-rw-r--r--nova/virt/disk/vfs/localfs.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/nova/virt/disk/mount/api.py b/nova/virt/disk/mount/api.py
index 1d9d1fc20..3690f6ddf 100644
--- a/nova/virt/disk/mount/api.py
+++ b/nova/virt/disk/mount/api.py
@@ -211,11 +211,11 @@ class Mount(object):
finally:
if not status:
LOG.debug(_("Fail to mount, tearing back down"))
- self.do_umount()
+ self.do_teardown()
return status
def do_umount(self):
- """Call the unmnt, unmap and unget operations."""
+ """Call the unmnt operation."""
if self.mounted:
self.unmnt_dev()
diff --git a/nova/virt/disk/vfs/localfs.py b/nova/virt/disk/vfs/localfs.py
index 9efa6798b..34c52dedd 100644
--- a/nova/virt/disk/vfs/localfs.py
+++ b/nova/virt/disk/vfs/localfs.py
@@ -85,7 +85,7 @@ class VFSLocalFS(vfs.VFS):
def teardown(self):
try:
if self.mount:
- self.mount.do_umount()
+ self.mount.do_teardown()
except Exception, e:
LOG.debug(_("Failed to unmount %(imgdir)s: %(ex)s") %
{'imgdir': self.imgdir, 'ex': str(e)})