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

M #-: Improve error message

This commit is contained in:
Tino Vazquez 2019-10-18 12:32:32 +02:00
parent a408130099
commit 508a1fec60
No known key found for this signature in database
GPG Key ID: 2FE9C32E94AEABBE

View File

@ -678,10 +678,12 @@ module VCenterDriver
query = vc_disks.select {|dev| key == dev[:key]}
else
if has_snapshots?
error = 'disk metadata is corrupted and you have snapshots'
error = 'Disk metadata not present and snapshots exist. ' \
'OpenNebula cannot manage this VM.'
raise error
end
# Try to find the disk using the path known by OpenNebula
path = !cloned ? one_disk['SOURCE'] : disk_real_path(one_disk, index)
query = vc_disks.select {|dev| path == dev[:path_wo_ds]}
end