Bug 1758565

Summary: Webadmin VMs SearchBox "vms: compatibility_level" not correctly applied to custom_compatibility_version
Product: Red Hat Enterprise Virtualization Manager Reporter: Antonio Romito <aromito>
Component: ovirt-engineAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.7CC: aperotti, rbarry, Rhev-m-bugs
Target Milestone: ovirt-4.4.0Flags: lsvaty: testing_plan_complete-
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-09 10:52:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Antonio Romito 2019-10-04 14:14:58 UTC
Description of problem:

From the Engine Web GUI filtering function in:
Compute --> Virtual Machines --> Vms: compatibility_level 
return the "vms.cluster_compatibility_version" instead of "vms.custom_compatibility_version"

Query performed on the database is:

~~~
:
...method: getAllUsingQuery, params: [SELECT * FROM ((SELECT  vms.* FROM  vms   WHERE  vms.cluster_compatibility_version ILIKE '4.1' )  ORDER BY vm_name ASC ) as T1 OFFSET (1 -1) LIMIT 100]...
:
~~~

It should be:

~~~
SELECT * FROM ((SELECT  vms.* FROM  vms   WHERE  vms.custom_compatibility_version ILIKE '4.1' 
~~~

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

RHV 4.2 (4.2.7.4)

How reproducible:

Try to apply a filter on "Compute --> Virtual Machines --> Vms: compatibility_level = "<custom_compatibility_version>". where VMs have minor compatibility version compared to the cluster compatibility version.


Steps to Reproduce:
1.Login to RHV
2.Select 'Compute' --> 'Virtual Machines'
3.Type in filter textbox -- >compatibility_level = "<custom_compatibility_version>"

Actual results:

Currently even if there are VMs with a custom_compatibility_version these are not returned when filter is applied  

Expected results:

When a filter on a given custom_compatibility_version is applied the search should return the VMs with that custom_compatibility_version


Additional info:

Comment 1 Antonio Romito 2019-10-04 14:17:41 UTC
*** Bug 1758548 has been marked as a duplicate of this bug. ***

Comment 3 Ryan Barry 2019-10-05 00:31:13 UTC
I remember a very similar bug, but can't find it right now

Comment 4 Andrej Krejcir 2019-10-07 14:55:43 UTC
This is the similar bug: Bug 1454389

Is is enough to use query: "Vms: custom_compatibility_level = ..."?
Or do you want the query "Vms: compatibility_level = ..." to consider cluster version as well as custom compatibility version?

Comment 6 Andrej Krejcir 2019-10-09 10:52:49 UTC

*** This bug has been marked as a duplicate of bug 1454389 ***