summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-02-20 13:38:39 +0000
committerGerrit Code Review <review@openstack.org>2013-02-20 13:38:39 +0000
commit96a4518575ea550d8e997444bfc243b7a822ec11 (patch)
tree1a16dcfc9d7968c75f32f4bfcd8c742edac5074c
parentadfb9217fd4780c7b0e2abb23f44d53cff94b1d4 (diff)
parente3fe55df23e496cee3f7b315a245ddcaaf9e8470 (diff)
Merge "Fix leak of loop/nbd devices in injection using localfs"
-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)})