Bug 1238179 - VM Utilization screen generating charts throws internal server error after Rails 4
Summary: VM Utilization screen generating charts throws internal server error after Ra...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.5.0
Assignee: Gregg Tanzillo
QA Contact: Nandini Chandra
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-01 11:06 UTC by Milan Zázrivec
Modified: 2015-12-08 13:20 UTC (History)
5 users (show)

Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-08 13:20:20 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Description Milan Zázrivec 2015-07-01 11:06:54 UTC
Description of problem:
* Current ManageIQ master with productization enabled (linked)
* VM utilization screen shows ISE

Version-Release number of selected component (if applicable):
Current ManageIQ master with cfme_productization 5.4.z linked

How reproducible:
Always

Steps to Reproduce:
1. Current ManageIQ master
2. CFME productization enabled
3. In server's advanced configuration tab, set: product.report_sync = true
4. Navigate to a particular's VM summary screen, click
   Monitoring -> Utilization


Actual results:
Internal server error:

[----] I, [2015-07-01T12:59:58.108816 #26995:3fdc62819998]  INFO -- : Started POST "/vm_infra/perf_chart_chooser/10000000000098" for 127.0.0.1 at 2015-07-01 12:59:58 +0200
[----] I, [2015-07-01T12:59:58.154212 #26995:3fdc62819998]  INFO -- : Processing by VmInfraController#perf_chart_chooser as JS
[----] I, [2015-07-01T12:59:58.154542 #26995:3fdc62819998]  INFO -- :   Parameters: {"id"=>"10000000000098"}
[----] F, [2015-07-01T12:59:58.384120 #26995:3fdc62819998] FATAL -- : Error caught: [RuntimeError] Unsupported options [:ext_options]
vmdb/lib/extensions/ar_merge_conditions.rb:32:in `apply_legacy_finder_options'
vmdb/app/models/rbac.rb:451:in `method_with_scope'
vmdb/app/models/rbac.rb:250:in `find_targets_without_rbac'
vmdb/app/models/rbac.rb:246:in `find_targets_with_rbac'
vmdb/app/models/rbac.rb:408:in `search'
vmdb/app/models/miq_report/generator.rb:275:in `_generate_table'
vmdb/app/models/miq_report/generator.rb:173:in `block in generate_table'
vmdb/app/models/user.rb:360:in `with_userid'
vmdb/app/models/miq_report/generator.rb:173:in `generate_table'
vmdb/app/models/miq_report/generator/async.rb:31:in `block in _async_generate_tables'
vmdb/app/models/miq_report/generator/async.rb:30:in `each'
vmdb/app/models/miq_report/generator/async.rb:30:in `each_with_index'
vmdb/app/models/miq_report/generator/async.rb:30:in `_async_generate_tables'
vmdb/app/models/miq_report/generator/async.rb:20:in `async_generate_tables'
vmdb/app/controllers/application_controller/performance.rb:756:in `perf_gen_data_before_wait'
vmdb/app/controllers/application_controller/performance.rb:631:in `perf_gen_data'
vmdb/app/controllers/application_controller/performance.rb:42:in `perf_chart_chooser'


Expected results:
No ISE.

Additional info:
N/A

Comment 3 Gregg Tanzillo 2015-07-14 18:22:02 UTC
PR - https://github.com/ManageIQ/manageiq/pull/3394

Comment 4 CFME Bot 2015-07-21 22:16:21 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/8615ffe72f4f6f765a18730397a90254cdc17b6c

commit 8615ffe72f4f6f765a18730397a90254cdc17b6c
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Wed Jul 8 16:24:00 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Sat Jul 11 07:26:12 2015 -0400

    Treat classes that have "derived" instances (instances_are_derived? => true) the same as classes that derive from ActsAsArModel and call custom find method in brace search. Also added a test that exposes an ActiveRecord bug where a query like "Tagging.includes(:taggable => {}).where('bogus_table.column = 1').references(:bogus_table => {}).to_a" raises an error. The AR error is preventing this bug from being fixed.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1238179

 app/models/rbac.rb                |  2 +-
 spec/models/metric_rollup_spec.rb | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 spec/models/metric_rollup_spec.rb

Comment 5 CFME Bot 2015-07-21 22:16:25 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/46f6d7c6f1db05ebf36fc22e6f1cd7ef6039dc0f

commit 46f6d7c6f1db05ebf36fc22e6f1cd7ef6039dc0f
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Wed Jul 8 16:40:20 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Sat Jul 11 07:26:12 2015 -0400

    Added parens around complex condition for clarity
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1238179

 app/models/rbac.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 6 CFME Bot 2015-07-21 22:16:29 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/be5eec6f80f81e99f79349afb13808afa0b95bec

commit be5eec6f80f81e99f79349afb13808afa0b95bec
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Sat Jul 11 07:25:16 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Sat Jul 11 07:26:12 2015 -0400

    Implemented workaround for the ActiveRecord issue that prevents running a query where a polymorphic reflection is specified in "includes" and ""references" are used in the query. It will check all of the included associations to see if any are polymorphic and if so avoid calling "references" on the scope. This change will still eager load any polymorphic associations that are included in the query.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1238179

 lib/extensions/ar_merge_conditions.rb | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

Comment 7 CFME Bot 2015-07-21 22:16:32 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/bba8ca8df7a013d8af5be99fdc313e3bcb4ae433

commit bba8ca8df7a013d8af5be99fdc313e3bcb4ae433
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Sat Jul 11 07:54:05 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Sat Jul 11 07:54:05 2015 -0400

    Made test that specifically tests the behavior of an AR query with includes with a polymorphic association and references pending until issue is addressed in ActiveRecord.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1238179

 spec/models/metric_rollup_spec.rb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comment 8 CFME Bot 2015-07-21 22:16:36 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/f1c113669561a7eb9cb4fe6f17b836f73402ee68

commit f1c113669561a7eb9cb4fe6f17b836f73402ee68
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Tue Jul 14 12:51:39 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Tue Jul 14 12:51:39 2015 -0400

    Fixed rubocop issues and added test for ar_merge_conditions.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1238179

 lib/extensions/ar_merge_conditions.rb           | 24 ++++++-------
 spec/lib/extensions/ar_merge_conditions_spec.rb | 48 +++++++++++++++++++++++++
 spec/models/metric_rollup_spec.rb               | 16 +++++----
 3 files changed, 69 insertions(+), 19 deletions(-)
 create mode 100644 spec/lib/extensions/ar_merge_conditions_spec.rb

Comment 9 CFME Bot 2015-07-21 22:16:40 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/432d7c2d4dc984bcd5b5b80bd76bfe63cff1cb21

commit 432d7c2d4dc984bcd5b5b80bd76bfe63cff1cb21
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Tue Jul 14 14:00:23 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Tue Jul 14 14:00:23 2015 -0400

    Fixed more rubocop issues.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1238179

 lib/extensions/ar_merge_conditions.rb           |  2 +-
 spec/lib/extensions/ar_merge_conditions_spec.rb | 37 ++++++++++++-------------
 spec/models/metric_rollup_spec.rb               |  6 ++--
 3 files changed, 22 insertions(+), 23 deletions(-)

Comment 10 Nandini Chandra 2015-11-20 23:49:38 UTC
Verified that there no issues while generating C&U charts.

Comment 12 errata-xmlrpc 2015-12-08 13:20:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551


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