Bug 1540699 - Selecting filter with "expression Service: Aggregate All Vm Cpus" results in exception
Summary: Selecting filter with "expression Service: Aggregate All Vm Cpus" results in ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.3
Assignee: Nick LaMuro
QA Contact: Matouš Mojžíš
URL:
Whiteboard: ui:filter
Depends On: 1539710
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-31 19:45 UTC by Satoe Imaishi
Modified: 2022-07-09 09:13 UTC (History)
8 users (show)

Fixed In Version: 5.8.3.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1539710
Environment:
Last Closed: 2018-02-28 13:13:50 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0374 0 normal SHIPPED_LIVE Important: Red Hat CloudForms security, bug fix, and enhancement update 2018-02-28 18:04:37 UTC

Comment 2 CFME Bot 2018-02-01 15:02:15 UTC
New commit detected on ManageIQ/manageiq/fine:
https://github.com/ManageIQ/manageiq/commit/a6d06865680a9741aa22ee35d21227d86c01077e

commit a6d06865680a9741aa22ee35d21227d86c01077e
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Wed Jan 31 10:24:37 2018 -0500
Commit:     Satoe Imaishi <simaishi>
CommitDate: Thu Feb 1 09:45:35 2018 -0500

    Merge pull request #16915 from NickLaMuro/bz-1539710-quick-fix-avoid-service-agg-col-with-miq-exp
    
    Exclude Service::AGGREGATE_ALL_VM_ATTRS from MiqExp.to_sql
    (cherry picked from commit 57095386dfb0fe1d799a1ad7bfc6fef6278dac98)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1540699

 lib/miq_expression.rb | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

Comment 3 Matouš Mojžíš 2018-02-21 10:26:57 UTC
Nick,
how can I verify this in 5.8 when there are no filters in My Services?
Thanks

Comment 4 Nick LaMuro 2018-02-21 16:51:43 UTC
Matouš,

Here is how I was able to reproduce the error pre patch (and with the patch, it no longer is reproducible):


1. Login and got to the Services -> My Services page:
2. Select the Advanced Search button (the double 'v' down arrow, to the right of the searchbox and magnifying glass button)
3. Select the following from the dropdowns in order:
  - "Field"
  - "Service:  Aggrigate All Vm Cpus
  - ">" (any operator would work, but I choose this)
  - "100" (again, any value would work here)
4. Click the checkmark above the search filter to apply it to the search
5. Click "Apply"

From here, you should get an error if the patch is not applied, otherwise you will get the updated search results.

Comment 5 Matouš Mojžíš 2018-02-22 15:54:36 UTC
Verified in 5.8.3.3.I ran in rails console command 'MiqExpression.new("=" => {"field" => "Service-aggregate_all_vm_cpus", "value" => "454"}).to_sql' without errors.

Comment 8 errata-xmlrpc 2018-02-28 13:13:50 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-2018:0374


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