Bug 1415751 - Webadmin SearchBox: "Vms:hosts" doesn't work
Summary: Webadmin SearchBox: "Vms:hosts" doesn't work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Infra
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.0
: 4.2.0
Assignee: Eli Mesika
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-23 16:10 UTC by Shira Maximov
Modified: 2017-12-20 11:44 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The reason for that is that both "Hosts" and "host" are available as search parameters. The search engine is case insensitive and therefor since it is processing the search string character-by-character after analysing the entity type (i.e what appears as "<entity>:" , "vms:" for example) it get the "host" as a token when you are writing "Hosts" and marks the "s" at the end of the "Hosts" string as an error. Consequence: search for "Hosts.<attribute>" for Vms Fix: Change "host" to "on_host" Result: You can search for "Hosts.<attribute>" Please keep in mind that the Vms search options should be changed from "host" to "on_host"
Clone Of:
Environment:
Last Closed: 2017-12-20 11:44:35 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
print screen (119.03 KB, image/png)
2017-01-23 16:10 UTC, Shira Maximov
no flags Details
video (4.09 MB, application/ogg)
2017-08-22 11:26 UTC, Shira Maximov
no flags Details
documentation (33.17 KB, image/png)
2017-08-22 11:34 UTC, Shira Maximov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 81209 0 master MERGED search: resolve ambiguous search parameter 2017-09-18 15:29:19 UTC

Description Shira Maximov 2017-01-23 16:10:02 UTC
Created attachment 1243638 [details]
print screen

Description of problem:
according to : 
https://access.redhat.com/documentation/en/red-hat-virtualization/4.0/paged/administration-guide/appendix-e-using-search-bookmarks-and-tags

The search should have Hosts.hosts-prop (The hosts-prop can be for example name/status/template and more)
when typing in the search :"Hosts=..", there is autocomplete for 'hosts' but then the 's' immediately paints in red, and there is no option to complete the search 	

Version-Release number of selected component (if applicable):
Red Hat Virtualization Manager Version: 4.0.6.3-0.1.el7ev


How reproducible:
100%

Steps to Reproduce:
1. go to vms tab in webadmin portal
2. try to perform this search = "VMs: Hosts.name="*"
3.

Actual results:


Expected results:


Additional info:

Comment 1 Michal Skrivanek 2017-08-22 08:04:15 UTC
you left VMs: at the beginning, so you're searching in context of VM object. 

> 2. try to perform this search = "VMs: Hosts.name="*"

I do not see the documentation saying that it is supported. It is not

Comment 2 Shira Maximov 2017-08-22 11:25:50 UTC
When typing Hosts. (in Virtual machines) I should get auto complete options , as same as Templates gives the options- name, comment, os and more
attaching video.

Comment 3 Shira Maximov 2017-08-22 11:26:26 UTC
Created attachment 1316587 [details]
video

Comment 4 Michal Skrivanek 2017-08-22 11:28:58 UTC
you still have Vms: up front. "Hosts:" is no a property of the VM

Comment 5 Shira Maximov 2017-08-22 11:34:15 UTC
Created attachment 1316591 [details]
documentation

please see the documentation

Comment 6 Michal Skrivanek 2017-08-22 14:07:05 UTC
not sure it's supposed to work, Martin?

Comment 7 Eli Mesika 2017-08-23 12:00:18 UTC
Seems like a bug (regression ...)

Comment 8 Eli Mesika 2017-08-30 12:21:38 UTC
After investigating the bug , this is not a regressions , it never worked ...

The problem was that from VMs search you can not search for Hosts
attributes (i.e. "Vms:Hosts.<some attribute>"

The reason for that is that both "Hosts" and "host" are available as
search parameters. The search engine is case insensitive and therefor
since it is processing the search string character-by-character after
analysing the entity type (i.e what appears as "<entity>:" , "vms:" for
example) it get the "host" as a token when you are writing "Hosts" and
marks the "s" at the end of the "Hosts" string as an error.

Comment 9 Martin Perina 2017-08-30 12:57:23 UTC
Moving to 4.2 as this never worked (although it's documented) and search backend is very fragile part of the code

Comment 10 Lucie Leistnerova 2017-10-10 10:55:58 UTC
autocomplete on 'Vms: Hosts.' works fine and search also (the same for 'Vms: host.*')

verified in ovirt-engine-4.2.0-0.0.master.20171009063348.gitf2b70a1.el7.centos.noarch

Comment 11 Sandro Bonazzola 2017-12-20 11:44:35 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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