B # 3190 Fix LXD unmap symlink issues

Co-authored-by: Daniel Clavijo Coca <dclavijo@opennebula.systems>
(cherry picked from commit 986b8caa233d64b88b58f3e1a67d68126e9ba763)
This commit is contained in:
Ruben S. Montero committed 2019-04-08 17:10:57 +02:00
1 parent 83bec40cbe
commit 3e968ba2de
1 file changed
+5 -1
+5 -1
View File
@@ -161,7 +161,11 @@ class Mapper
device = ''
real_path = directory
real_path = File.realpath(directory) if File.symlink?(one_vm.sysds_path)
is_rootfs = real_path =~ %r{.*/rootfs}
is_shared_ds = File.symlink?(one_vm.sysds_path)
real_path = File.realpath(directory) if !is_rootfs && is_shared_ds
sys_parts.each {|d|
if d['mountpoint'] == real_path