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 sbernhard committed Dec 8, 2023
1 parent fa79642 commit ac884be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 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,10 @@ 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 = attachment_disk.storage_domains[0].id || 0 rescue begin
Fog::Logger.warning("Error parsing attachment_disk.storage_domains response json - #{e}. Fallback to 0")
0
end
ovirt_attrs attachment_disk
end
end
Expand Down

0 comments on commit ac884be

Please sign in to comment.