Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
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...
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - RHEV
Version: 6.7.0
Hardware: All
OS: All
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lukáš Hellebrandt
Depends On:
TreeView+ depends on / blocked
Reported: 2020-09-24 13:36 UTC by Sayan Das
Modified: 2021-04-29 07:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Target Upstream Version:

Attachments (Terms of Use)

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-
- 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)

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