Bug 1513580

Summary: Searching for VM called 'memory' broken
Product: [oVirt] ovirt-engine Reporter: jniederm
Component: BLL.InfraAssignee: Martin Perina <mperina>
Status: CLOSED DUPLICATE QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: futureCC: bugs, oourfali
Target Milestone: ---   
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: 2017-11-15 20:17:10 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:
Attachments:
Description Flags
screenshot.png none

Description jniederm 2017-11-15 16:02:33 UTC
Created attachment 1352711 [details]
screenshot.png

Description of problem:
A VM called 'memory' can't be found using webadmin search bar. However search results for any prefix of its name ('m', 'me', ...) contains the VM.

Version-Release number of selected component (if applicable):
current master, commit 9e4a40da1a

How reproducible:
100%

Steps to Reproduce:
1. Create a VM called 'memory'
2. I webadmin, VMs tab select search bar labeled 'Vms:'
3. Enter 'memory' and confirm

Actual results:
VM called 'memory' is not part of search results

Expected results:
VM called 'memory' is part of search results


Additional info:
Each search generates engine log warning like:
2017-11-15 16:50:08,987+01 WARN  [org.ovirt.engine.core.bll.SearchQuery] (default task-67) [6823b13c-73d9-4c26-929a-8e847352afcd] ResourceManager::searchBusinessObjects - Invalid search text - ''Vms:memory''

Comment 1 Martin Perina 2017-11-15 20:16:36 UTC
'memory' is a reserved word and its parsing has higher priority, see [1]. If you want to search VMs which name starts with reserved word you need to use following pattern:

  Vms: name=memory


[1] https://bugzilla.redhat.com/show_bug.cgi?id=1431882#c8

Comment 2 Martin Perina 2017-11-15 20:17:10 UTC

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