Bug 1394021 - after migration, VM details screen not loading
Summary: after migration, VM details screen not loading
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.0
Assignee: Tomas Jelinek
QA Contact: Ilanit Stein
URL:
Whiteboard: upgrade:migration
Depends On:
Blocks: 1396221
TreeView+ depends on / blocked
 
Reported: 2016-11-10 20:36 UTC by Yuri Rudman
Modified: 2017-08-16 14:16 UTC (History)
12 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1396221 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:34:57 UTC
Category: ---
Cloudforms Team: RHEVM
Target Upstream Version:


Attachments (Terms of Use)
DB dump (364.09 KB, application/x-xz)
2016-11-10 20:36 UTC, Yuri Rudman
no flags Details
Screenshot (93.16 KB, image/png)
2016-11-10 20:50 UTC, Yuri Rudman
no flags Details

Description Yuri Rudman 2016-11-10 20:36:38 UTC
Created attachment 1219541 [details]
DB dump

Description of problem:


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


How reproducible: always on attached DB


Steps to Reproduce:
1. migrate attached DB 
2. navigate to Vms & Templates and click on 'cloudsforms'

Actual results:
VM details screen not loaded

In the log:
FATAL -- : Error caught: [OvirtSDK4::Error] Can't send request: Couldn't connect to server
/Users/yrudman/.gem/ruby/2.2.4/gems/ovirt-engine-sdk-4.0.6/lib/ovirtsdk4/probe.rb:169:in `send'
/Users/yrudman/.gem/ruby/2.2.4/gems/ovirt-engine-sdk-4.0.6/lib/ovirtsdk4/probe.rb:169:in `send'
/Users/yrudman/.gem/ruby/2.2.4/gems/ovirt-engine-sdk-4.0.6/lib/ovirtsdk4/probe.rb:178:in `block in detect_path'
/Users/yrudman/.gem/ruby/2.2.4/gems/ovirt-engine-sdk-4.0.6/lib/ovirtsdk4/probe.rb:176:in `each'
/Users/yrudman/.gem/ruby/2.2.4/gems/ovirt-engine-sdk-4.0.6/lib/ovirtsdk4/probe.rb:176:in `detect_path'
/Users/yrudman/.gem/ruby/2.2.4/gems/ovirt-engine-sdk-4.0.6/lib/ovirtsdk4/probe.rb:119:in `probe'
/Users/yrudman/.gem/ruby/2.2.4/gems/ovirt-engine-sdk-4.0.6/lib/ovirtsdk4/probe.rb:55:in `probe'
/Users/yrudman/work/rh/manageiq/app/models/manageiq/providers/redhat/infra_manager/api_integration.rb:61:in `supported_api_verions_from_sdk'
/Users/yrudman/work/rh/manageiq/app/models/manageiq/providers/redhat/infra_manager/api_integration.rb:50:in `block in supported_api_versions_from_cache'


After work around on above error(rescue call OvirtSDK4::Probe.probe(probe_args) ) different error:

Error caught: [NoMethodError] undefined method `validate_migrate' for #<ManageIQ::Providers::Redhat::InfraManager::Vm:0x007ff290c41280>
/Users/yrudman/.gem/ruby/2.2.4/gems/activemodel-5.0.0.1/lib/active_model/attribute_methods.rb:433:in `method_missing'
/Users/yrudman/work/rh/manageiq/app/models/mixins/availability_mixin.rb:24:in `is_available?'
/Users/yrudman/work/rh/manageiq/app/helpers/application_helper/button/generic_feature_button.rb:13:in `rescue in visible?'
/Users/yrudman/work/rh/manageiq/app/helpers/application_helper/button/generic_feature_button.rb:10:in `visible?'
/Users/yrudman/work/rh/manageiq/app/helpers/application_helper/button/basic.rb:61:in `skipped?'
/Users/yrudman/work/rh/manageiq/app/helpers/application_helper/toolbar_builder.rb:88:in `toolbar_button'
/Users/yrudman/work/rh/manageiq/app/helpers/application_helper/toolbar_builder.rb:112:in `block in build_select_button'


Also, when executing from console:
 Vm.first.supports_migrate?
  Vm Load (1.2ms)  SELECT  "vms".* FROM "vms" WHERE "vms"."type" IN ('Vm', 'ManageIQ::Providers::CloudManager::Vm', 'ManageIQ::Providers::InfraManager::Vm', 'VmServer', 'ManageIQ::Providers::Google::CloudManager::Vm', 'ManageIQ::Providers::Openstack::CloudManager::Vm', 'ManageIQ::Providers::Vmware::CloudManager::Vm', 'ManageIQ::Providers::Amazon::CloudManager::Vm', 'ManageIQ::Providers::Azure::CloudManager::Vm', 'ManageIQ::Providers::Microsoft::InfraManager::Vm', 'ManageIQ::Providers::Redhat::InfraManager::Vm', 'ManageIQ::Providers::Vmware::InfraManager::Vm', 'VmXen') AND "vms"."template" = $1 ORDER BY "vms"."id" ASC LIMIT $2  [["template", false], ["LIMIT", 1]]
  Vm Inst Including Associations (0.3ms - 1rows)
  ExtManagementSystem Load (3.2ms)  SELECT  "ext_management_systems".* FROM "ext_management_systems" WHERE "ext_management_systems"."id" = $1 LIMIT $2  [["id", 1000000000001], ["LIMIT", 1]]
  ExtManagementSystem Inst Including Associations (1743.3ms - 1rows)
NoMethodError: undefined method `collect' for nil:NilClass
	from /Users/yrudman/work/rh/manageiq/app/models/manageiq/providers/redhat/infra_manager/api_integration.rb:11:in `supported_features'
	from /Users/yrudman/work/rh/manageiq/app/models/manageiq/providers/redhat/infra_manager/api_integration.rb:237:in `block (2 levels) in process_api_features_support'
	from 



Additional info:
attached DB was obtained from training lab, from this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1390827

Comment 2 Yuri Rudman 2016-11-10 20:50:35 UTC
Created attachment 1219545 [details]
Screenshot

Comment 3 Šimon Lukašík 2016-11-11 10:08:17 UTC
https://github.com/ManageIQ/manageiq/pull/12574

Comment 4 Gregg Tanzillo 2016-11-11 14:19:22 UTC
I just merged Simon's PR and that will eliminate the UI blowing up. However, I think we still need to resolve the underlying error that was causing the blow up in the first place. 

I'm assigning to the providers group for further investigation. Please assign back to appliance if you think this is something that we need to address. Thanks.

Comment 5 CFME Bot 2016-11-11 15:21:03 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/28d4810a569134f1f79bd02b180c2785fd0c8fa4

commit 28d4810a569134f1f79bd02b180c2785fd0c8fa4
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Fri Nov 11 09:14:52 2016 -0500
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Fri Nov 11 10:17:12 2016 -0500

    Merge pull request #12574 from isimluk/rhbz#1394021
    
    Custom supports methods shall not crash UI
    (cherry picked from commit bbb8543ff1df2c6129922bea0bf0b21b4ec4d7f0)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1394021

 app/models/mixins/supports_feature_mixin.rb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comment 6 Tomas Jelinek 2016-11-16 15:13:13 UTC
Created PR:
https://github.com/ManageIQ/manageiq/pull/12682

Comment 7 Oved Ourfali 2016-11-17 15:42:25 UTC
As we have a pretty straight forward fix, I'd like it in 5.7.0.

Comment 8 Oved Ourfali 2016-11-17 16:11:56 UTC
PR is merged. Moving to POST.

Comment 10 Ilanit Stein 2017-05-04 11:14:35 UTC
Verified on CFME-5.8.0.13 / RHV-4.1.1.8

1. Have CFME, with RHV attached as provider and can see some VMs details pages from it
2. CFME Reboot CFME, RHV power off & on.
3. Login to the CFME, and try to go to the VM details screen => 
   Page is displayed and populated with data.


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