Bug 1347007

Summary: [Dashboard] Search mechanism does not know all storage statuses
Product: [oVirt] ovirt-engine Reporter: Pavel Novotny <pnovotny>
Component: Search-BackendAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: bugs, mperina
Target Milestone: ovirt-4.0.1Flags: rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
mperina: devel_ack+
pstehlik: testing_ack+
Target Release: 4.0.1.1   
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: 2016-08-04 13:32:29 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: 1324860    
Attachments:
Description Flags
Storage search query & status auto-complete list none

Description Pavel Novotny 2016-06-15 18:57:38 UTC
Created attachment 1168472 [details]
Storage search query & status auto-complete list

Description of problem:
In Dashboard, storage warning status is mapped to following storage backend statuses:
uninitialized, unattached, inactive, maintenance, preparingformaintenance, detaching, activating
However the search mechanism knows only few of them and the rest evaluates as erroneous search query.
At least following statuses are unknown to the search:
uninitialized, maintenance, preparingformaintenance, detaching, activating
See attached screenshot for details.

Version-Release number of selected component (if applicable):
rhevm-4.0.0.4-0.1.el7ev.noarch (build 4.0.0-14)
ovirt-engine-4.0.0.4-0.1.el7ev.noarch
Also reproduced in master: 
ovirt-engine-4.1.0-0.0.master.20160614111316.git3418fb1.el7.centos.noarch

How reproducible:
100%

Steps to Reproduce:
1. In Dashboard, have one storage in Warning status (see mapped statuses in description).
2. Click on the storage Warning icon/value.
3. This moves you to the Storage tab, searching for storages with specific statuses.

Actual results:
No storage is displayed/filtered. The search query string is red.

Expected results:
The one storage from step 1. is displayed.
Moreover, the search mechanism should be aware of all storage statuses and offer them in frontend auto-complete list.

Additional info:

In 3.6.7, the situation is almost the same, except that auto-complete offers also 'locked' status.

engine.log excerpt:
2016-06-15 18:33:43,914 INFO  [org.ovirt.engine.core.bll.SearchQuery] (default task-21) [] ResourceManager::searchBusinessObjects - erroneous search text - ''Storage: status = uninitialized or status = unattached or status = inactive or status = maintenance or status = preparingformaintenance or status = detaching or status = activating''

Comment 1 Martin Perina 2016-06-20 07:41:27 UTC
Moving back to post, patch needs to be backported to ovirt-engine-4.0 branch

Comment 2 Pavel Novotny 2016-07-28 16:35:34 UTC
Verified in 
ovirt-engine-backend-4.0.2.1-0.1.el7ev.noarch
rhevm-4.0.2.1-0.1.el7ev.noarch

Search mechanism now accepts all storage domain statuses.
Looking up storages via Dashboard's Up, Down and Warning states didn't raise any errors in search backend and the auto-complete for 'Storage: status =' now offers:

Storage: status = unknown
Storage: status = uninitialized
Storage: status = unattached
Storage: status = active
Storage: status = inactive
Storage: status = locked
Storage: status = maintenance
Storage: status = preparingformaintenance
Storage: status = detaching
Storage: status = activating