Bug 1513398 - rhv manager does not show the results of the search properly
Summary: rhv manager does not show the results of the search properly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.1.6
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ovirt-4.3.0
: ---
Assignee: Eli Mesika
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks: 1519777
TreeView+ depends on / blocked
 
Reported: 2017-11-15 10:42 UTC by Marian Jankular
Modified: 2021-03-11 18:30 UTC (History)
15 users (show)

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.
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
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:1085 0 None None None 2019-05-08 12:37:11 UTC
oVirt gerrit 84508 0 master MERGED db: vm description/comment default to empty string 2020-11-27 14:58:16 UTC
oVirt gerrit 84511 0 ovirt-engine-4.1 MERGED db: vm description/comment default to empty string 2020-11-27 14:58:17 UTC
oVirt gerrit 86711 0 master MERGED search:Implementing empty-string-is-null behaviour 2020-11-27 14:58:17 UTC
oVirt gerrit 87560 0 ovirt-engine-4.2 MERGED search:Implementing empty-string-is-null behaviour 2020-11-27 14:58:17 UTC
oVirt gerrit 88618 0 master MERGED search: revert old implementation 2020-11-27 14:58:17 UTC
oVirt gerrit 88619 0 master MERGED db: add func to turn table columns to empty string 2020-11-27 14:58:18 UTC
oVirt gerrit 88620 0 master MERGED db:default all search engine fields to empty str 2020-11-27 14:58:18 UTC
oVirt gerrit 88737 0 ovirt-engine-4.2 MERGED search: revert old implementation 2020-11-27 14:58:18 UTC
oVirt gerrit 88738 0 ovirt-engine-4.2 MERGED db: add func to turn table columns to empty string 2020-11-27 14:58:18 UTC
oVirt gerrit 88739 0 ovirt-engine-4.2 MERGED db:default all search engine fields to empty str 2020-11-27 14:58:19 UTC
oVirt gerrit 89005 0 master MERGED db: setting cluster cpu_name,emulated_machine... 2020-11-27 14:58:19 UTC
oVirt gerrit 89035 0 ovirt-engine-4.2 MERGED db: setting cluster cpu_name,emulated_machine... 2020-11-27 14:58:19 UTC
oVirt gerrit 89293 0 master MERGED core:make search string fields not null and empty 2020-11-27 14:58:19 UTC
oVirt gerrit 93501 0 ovirt-engine-4.2 MERGED core:make search string fields not null and empty 2020-11-27 14:58:19 UTC
oVirt gerrit 93930 0 master MERGED search: handle storage domain and disk 2020-11-27 14:58:18 UTC

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


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