1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

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 2019-04-08 12:49:55 +02:00
parent 83bec40cbe
commit 3e968ba2de
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

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