Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1513398 - rhv manager does not show the results of the search properly [NEEDINFO]
Summary: rhv manager does not show the results of the search properly
Keywords:
Status: VERIFIED
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: 2019-04-14 12:51 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:
oVirt Team: Infra
apinnick: needinfo? (mjankula)


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 84508 master MERGED db: vm description/comment default to empty string 2017-11-22 13:22:56 UTC
oVirt gerrit 84511 ovirt-engine-4.1 MERGED db: vm description/comment default to empty string 2017-11-22 14:05:38 UTC
oVirt gerrit 86711 master MERGED search:Implementing empty-string-is-null behaviour 2018-02-13 12:01:48 UTC
oVirt gerrit 87560 ovirt-engine-4.2 MERGED search:Implementing empty-string-is-null behaviour 2018-02-14 08:48:16 UTC
oVirt gerrit 88618 master MERGED search: revert old implementation 2018-03-09 17:09:30 UTC
oVirt gerrit 88619 master MERGED db: add func to turn table columns to empty string 2018-03-09 17:09:33 UTC
oVirt gerrit 88620 master MERGED db:default all search engine fields to empty str 2018-03-09 17:09:36 UTC
oVirt gerrit 88737 ovirt-engine-4.2 MERGED search: revert old implementation 2018-03-10 16:15:37 UTC
oVirt gerrit 88738 ovirt-engine-4.2 MERGED db: add func to turn table columns to empty string 2018-03-10 16:15:42 UTC
oVirt gerrit 88739 ovirt-engine-4.2 MERGED db:default all search engine fields to empty str 2018-03-10 16:15:48 UTC
oVirt gerrit 89005 master MERGED db: setting cluster cpu_name,emulated_machine... 2018-03-15 09:15:41 UTC
oVirt gerrit 89035 ovirt-engine-4.2 MERGED db: setting cluster cpu_name,emulated_machine... 2018-03-15 10:53:24 UTC
oVirt gerrit 89293 master MERGED core:make search string fields not null and empty 2018-05-22 10:12:53 UTC
oVirt gerrit 93501 ovirt-engine-4.2 MERGED core:make search string fields not null and empty 2018-08-07 09:05:23 UTC
oVirt gerrit 93930 master MERGED search: handle storage domain and disk 2018-09-18 12:04:03 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 Bugzilla Automation and Verification 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@redhat.com

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


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