Skip to content

Commit

Permalink
Fix storage domain issue when attaching LUN
Browse files Browse the repository at this point in the history
  • Loading branch information
Manisha15 authored and ShimShtein committed Oct 10, 2024
1 parent 191d41b commit 258871d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ def list_vm_volumes(vm_id)
interface = attachment.interface
attachment_disk.bootable = bootable if attachment_disk.bootable.nil?
attachment_disk.interface = interface if attachment_disk.interface.nil?
attachment_disk.storage_domain = attachment_disk.storage_domains[0].id
attachment_disk.storage_domain = begin
attachment_disk.storage_domains.first&.id
rescue StandardError => e
Fog::Logger.warning("Error parsing attachment_disk.storage_domains - #{e}. Fallback to 0")
0
end
ovirt_attrs attachment_disk
end
end
Expand Down

0 comments on commit 258871d

Please sign in to comment.