Bug 1513398

Summary: rhv manager does not show the results of the search properly
Product: Red Hat Enterprise Virtualization Manager Reporter: Marian Jankular <mjankula>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED ERRATA QA Contact: Lucie Leistnerova <lleistne>
Severity: medium Docs Contact:
Priority: high    
Version: 4.1.6CC: apinnick, inetkach, lsurette, lsvaty, lveyde, mgoldboi, mjankula, mperina, obockows, pmatyas, pstehlik, Rhev-m-bugs, sborella, srevivo, tjelinek
Target Milestone: ovirt-4.3.0Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.0_rc Doc Type: If docs needed, set a value
Doc Text:
In the Administration Portal, searching for virtual machines by network label, VM emulated machine, and CPU type are not supported due to the complexity of their implementation.
Story Points: ---
Clone Of:
: 1519777 (view as bug list) Environment:
It should be documented that network label and vm emulated machine and cpu type are not supported due to complexity of implementation
Last Closed: 2019-05-08 12:36:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1519777    

Description Marian Jankular 2017-11-15 10:42:24 UTC
Description of problem:
rhv manager does not show the results of the search properly

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

How reproducible:
always

Steps to Reproduce:
Search on a given attribute gives the expected result (ie. list of all VMs having this attribute set on this value). 
But when an attribute is empty, the associated VM does not appear ever in the results of a research.

Example with 3 VMs:
- VM1 with attribute comment foo
- VM2 with attribute comment bar
- VM3 without attribute comment (attribute empty)

When we do the following research:
- Vms: comment = foo
=> gives VM1

- Vms: comment != foo
=> gives VM2 (but not VM3 !)

- Vms: comment = ""
=> does not give anything 

- Vms: comment != ""
=> gives VM1 and VM2


Actual results:
search does not include vms when comment attribute is empty

Expected results:
search will include vms when comment attribute is empty

Additional info:
it is working with "Vms: description =/!=" as expected

Comment 1 Tomas Jelinek 2017-11-20 08:27:22 UTC
It is an issue in BaseConditionFieldAutoCompleter. 

There were some fixes around this area in 4.2 but Im not sure it will handle also this case:
https://bugzilla.redhat.com/show_bug.cgi?id=1252906
https://bugzilla.redhat.com/show_bug.cgi?id=1454821

Moving to infra to make sure.

Comment 7 Petr Matyáš 2018-02-22 13:53:38 UTC
When searching for "Vms: comment != foo" I get only VM2 (using example in description).
Not sure if this was intended, but from description it appears that it is desired by reporter.

Tested on ovirt-engine-4.2.2.1-0.1.el7.noarch

Comment 11 RHV bug bot 2018-03-16 15:03:28 UTC
INFO: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Tag 'ovirt-engine-4.2.2.4' doesn't contain patch 'https://gerrit.ovirt.org/87560']
gitweb: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs/tags/ovirt-engine-4.2.2.4

For more info please contact: rhv-devops

Comment 12 Petr Matyáš 2018-03-16 16:05:21 UTC
Verified on ovirt-engine-4.2.2.4-0.1.el7.noarch

Comment 13 Eli Mesika 2018-03-20 10:19:05 UTC
reopening this bug.

The reason is that BZ 1519777 on 4.1 failed verification.

When I checked that, I found that verification on upgraded system will succeed (as done on master/4.2) while verification on new system will fail (as in 4.1) 

The reason for that is that even if we change the default to be empty string, if we pass NULL explicitly for the column value (as our SP do when called from DAO code) , then NULL is inserted into the database and the BZ is reproduced.

I have consulted with Martin and we concluded that we will:

1) Reopen this BZ
2) Change the corresponding columns in database to be NOT NULL
3) Change the corresponding business entities field setters to set the value to empty string if it is null 
4) Back-port the fix to 4.2 and 4.1 branch 


NOTE:

1) This should be tested on new entities added to the application. 
2) The solution does not include cluster table cpu_name and emulated_machine columns that fails on empty string value on OST.

Comment 14 Martin Perina 2018-04-04 10:58:31 UTC
Fixing this issue is much more problematic then we though, moving to 4.3 and once fixed properly we can think of 4.2.z backport

Comment 16 Eli Mesika 2018-08-21 15:18:29 UTC
Leftovers which are still not working :


> Storage.description
> Storage.comment
> Disk.description

Comment 22 Lucie Leistnerova 2019-01-29 17:21:51 UTC
Search for description/comment works as expected. I've tried it on new installation and also on upgraded 4.1 -> 4.2 -> 4.3

verified in ovirt-engine-4.3.0-0.8.rc2.el7.noarch

Comment 24 errata-xmlrpc 2019-05-08 12:36:48 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/RHEA-2019:1085