Bug 741860

Summary: Searching systems by key-value, "is" and "is not" give wrong results.
Product: [Retired] Beaker Reporter: Kunshan Wang <kuwang>
Component: web UIAssignee: Raymond Mancy <rmancy>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 0.7CC: bpeck, dcallagh, ebaak, mcsontos, rmancy, stl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-15 00:16:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Kunshan Wang 2011-09-28 08:23:26 UTC
Description of problem:

Look at the three querys:

1. CPU_CODENAME contains "Westmere-EX"

https://beaker.engineering.redhat.com/?systemsearch-0.table=Key%2FValue&systemsearch-0.keyvalue=CPU_CODENAME&systemsearch-0.operation=contains&systemsearch-0.value=Westmere-EX&Search=Search&systemsearch_column_System%2FArch=System%2FArch&systemsearch_column_System%2FModel=System%2FModel&systemsearch_column_System%2FName=System%2FName&systemsearch_column_System%2FStatus=System%2FStatus&systemsearch_column_System%2FType=System%2FType&systemsearch_column_System%2FUser=System%2FUser&systemsearch_column_System%2FVendor=System%2FVendor

2. CPU_CODENAME contains Westmere-EX and HVM is 1

https://beaker.engineering.redhat.com/?systemsearch-0.table=Key%2FValue&systemsearch-0.keyvalue=CPU_CODENAME&systemsearch-0.operation=contains&systemsearch-0.value=Westmere-EX&systemsearch-1.table=Key%2FValue&systemsearch-1.keyvalue=HVM&systemsearch-1.operation=is&systemsearch-1.value=1&Search=Search&systemsearch_column_System%2FArch=System%2FArch&systemsearch_column_System%2FModel=System%2FModel&systemsearch_column_System%2FName=System%2FName&systemsearch_column_System%2FStatus=System%2FStatus&systemsearch_column_System%2FType=System%2FType&systemsearch_column_System%2FUser=System%2FUser&systemsearch_column_System%2FVendor=System%2FVendor

3. CPU_CODENAME contains Westmere-EX and HVM is not 1

https://beaker.engineering.redhat.com/?systemsearch-0.table=Key%2FValue&systemsearch-0.keyvalue=CPU_CODENAME&systemsearch-0.operation=contains&systemsearch-0.value=Westmere-EX&systemsearch-1.table=Key%2FValue&systemsearch-1.keyvalue=HVM&systemsearch-1.operation=is+not&systemsearch-1.value=1&Search=Search&systemsearch_column_System%2FArch=System%2FArch&systemsearch_column_System%2FModel=System%2FModel&systemsearch_column_System%2FName=System%2FName&systemsearch_column_System%2FStatus=System%2FStatus&systemsearch_column_System%2FType=System%2FType&systemsearch_column_System%2FUser=System%2FUser&systemsearch_column_System%2FVendor=System%2FVendor

Query1 returns 8 systems, but both query2 and query3 return 0.

It is obvious that every system's HVM should either "is" 1 or "is not" 1.

Actually, intel-sunriseridge-01.lab.bos.redhat.com and intel-sunriseridge-02.lab.bos.redhat.com in the result of query1 have HVM=0. Others have HVM=1. So query2 and query3 are simply giving wrong answers.



How reproducible:
Always

Steps to Reproduce:
1. Open https://beaker.engineering.redhat.com/ and click "Toggle search"
2. Add a Key/Value criteria: CPU_CODENAME contains Westmere-EX
3. Add another Key/Value criteria: HVM is 1
4. Search
  
Actual results:
No results.

Expected results:
6 of the 8 Westmere-EX machines should return.

Additional info:
None

Comment 1 Raymond Mancy 2011-10-19 04:54:51 UTC
This is an easy fix, I forgot to add an alias option where it does the join for key_value_* tables.

Comment 2 Bill Peck 2012-01-23 16:27:33 UTC
Status?