Bug 1882404 - Unable to edit a VM in Satellite GUI if it's hosted on RHV and has a direct attached LUN
Summary: Unable to edit a VM in Satellite GUI if it's hosted on RHV and has a direct a...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - RHEV
Version: 6.7.0
Hardware: All
OS: All
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
: 2080086 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-24 13:36 UTC by Sayan Das
Modified: 2022-12-02 17:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-02 17:25:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30199 0 Normal New Foreman error if RHV VM has a LUN direct attached 2021-01-05 21:25:53 UTC

Description Sayan Das 2020-09-24 13:36:49 UTC
Description of problem:

Unable to edit the VM in Satellite GUI if it's hosted on RHV and has a direct attached LUN.


Version-Release number of selected component (if applicable):

- satellite-6.7.3-1.el7sat.noarch
- foreman-ovirt-1.24.1.25-1.el7sat.noarch
- tfm-rubygem-fog-ovirt-1.2.4-1.el7sat.noarch
- tfm-rubygem-ovirt-engine-sdk-4.2.3-3.el7sat.x86_64
- RHV 4.3 and 4.4 [hosts connected with Direct Attached LUN]


How reproducible:

Always  [ In customer's environment ]

Steps to Reproduce:

1. Create RHV compute resource on Satellite server
2. Have a host built with Direct Attached LUN on RHV 4.3 or 4.4
3. Register the host with Satellite server.
4. Associate the host with Compute Resource.
5. Try to edit the Host from Hosts --> All Hosts or Try to access the "VM" tab of the host.


Actual results:

~~~
2020-09-24T09:40:38 [I|app|bf9aa353]   Rendered hosts/_compute_detail.html.erb (206.5ms)
2020-09-24T09:40:38 [I|app|bf9aa353]   Rendered hosts/_compute.html.erb (257.7ms)
2020-09-24T09:40:38 [I|app|bf9aa353]   Rendered hosts/_unattended.html.erb (258.6ms)
2020-09-24T09:40:38 [D|tax|bf9aa353] Current location set to 21C
2020-09-24T09:40:38 [D|tax|bf9aa353] Current organization set to itsc
2020-09-24T09:40:38 [I|app|bf9aa353]   Rendered hosts/_form.html.erb (880.0ms)
2020-09-24T09:40:38 [I|app|bf9aa353]   Rendered hosts/edit.html.erb within layouts/application (899.3ms)
2020-09-24T09:40:38 [W|app|bf9aa353] Action failed
2020-09-24T09:40:38 [D|app|bf9aa353] Backtrace for 'Action failed' error (ActionView::Template::Error): undefined method `[]' for nil:NilClass
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-ovirt-1.2.4/lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb:17:in `block in list_vm_volumes'
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-ovirt-1.2.4/lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb:10:in `map'
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-ovirt-1.2.4/lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb:10:in `list_vm_volumes'
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-ovirt-1.2.4/lib/fog/ovirt/models/compute/volumes.rb:15:in `all'
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-core-2.1.0/lib/fog/core/collection.rb:112:in `lazy_load'
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-core-2.1.0/lib/fog/core/collection.rb:16:in `each
~~~


Expected results:

Should be able to edit the host and see the compute attributes and storage details for the VM.


Additional info:

* Upstream issue is already filed --> https://projects.theforeman.org/issues/30199 

* This issue only happens for VM's present in RHV with Direct Attached LUN's. And the power state of the host does not gets reflected as well.

* Even when trying to list the compute attributes via foreman-rake, that will fail with following error.
~~
irb(main):006:0> pp h.vm_compute_attributes
Traceback (most recent call last):
        9: from lib/tasks/console.rake:5:in `block in <top (required)>'
        8: from (irb):6
        7: from app/models/host/managed.rb:696:in `vm_compute_attributes'
        6: from app/models/compute_resource.rb:362:in `vm_compute_attributes_for'
        5: from app/models/compute_resource.rb:372:in `vm_compute_attributes'
        4: from app/models/compute_resource.rb:457:in `set_vm_volumes_attributes'
        3: from app/models/compute_resource.rb:457:in `map'
        2: from app/models/compute_resource.rb:457:in `each'
        1: from app/models/compute_resource.rb:457:in `each_with_index'
NoMethodError (undefined method `[]' for nil:NilClass)
~~

Comment 7 Waldirio M Pinheiro 2022-05-14 00:27:50 UTC
*** Bug 2080086 has been marked as a duplicate of this bug. ***

Comment 9 franz.skale@itg.graz.at 2022-06-01 13:03:53 UTC
Bug confirmation: Redhat Satellite 6.9.6.1
Affected package: tfm-rubygem-fog-ovirt-1.2.5-1.el7sat.noarch

My hotfix for those who don't use provisioning along with OVIRT but want to manage the VMs:

File:
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-ovirt-1.2.5/lib/fog/ovirt/requests/compute/v4/list_vm_volumes.rb

Line 16:
#attachment_disk.storage_domain = attachment_disk.storage_domains[0].id
attachment_disk.storage_domain = 0

The whole module lacks of type validation IMHO !

Best
Franz

Comment 10 Brad Buckingham 2022-11-03 21:47:41 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 11 Brad Buckingham 2022-12-02 17:25:56 UTC
Thank you for your interest in Red Hat Satellite. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.


Note You need to log in before you can comment on or make changes to this bug.