From b35b34a65a6ddcfee524304cc548b4dfe1fc6cd5 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Sat, 8 Sep 2012 02:43:01 +0100 Subject: fix unmounting of LXC containers in the presence of symlinks When looking up the mount dir in /proc/mounts we need to canonicalize the path so that symlinks are resolved Fixes bug: 1046313 Change-Id: Ib2bb8253e9cdfeda3c6ba13e56a0f907518ff558 --- nova/virt/disk/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova') diff --git a/nova/virt/disk/api.py b/nova/virt/disk/api.py index f1c1c409c..008445a4a 100644 --- a/nova/virt/disk/api.py +++ b/nova/virt/disk/api.py @@ -209,7 +209,7 @@ class _DiskImage(object): with open("/proc/mounts", 'r') as ifp: for line in ifp: fields = line.split() - if fields[1] == path: + if fields[1] == os.path.realpath(path): device = fields[0] break return device -- cgit