1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-12 08:58:17 +03:00

B #-: Fix live migrate symlink restore (#3024)

otherwise disk.0 symlink looks like
  `disk.0 -> disk.0.snap`

instead e.g.
  `disk.0 -> disk.0.snap/2`
This commit is contained in:
Jan Orel 2024-04-04 19:47:50 +02:00 committed by GitHub
parent a9cb27d9f9
commit 87862523e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,7 +174,7 @@ def local_migration(kvm_vm)
if File.symlink? path
target = File.readlink(path)
lname = path
elsif (m = path.match(%r{(disk.([0-9]*).snap)/.*})) # replica
elsif (m = path.match(%r{(disk.([0-9]*).snap/.*)}))
target = m[1]
lname = "disk.#{m[2]}"
else