Bug 741860 - Searching systems by key-value, "is" and "is not" give wrong results.
Summary: Searching systems by key-value, "is" and "is not" give wrong results.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: web UI
Version: 0.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: ---
Assignee: Raymond Mancy
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-28 08:23 UTC by Kunshan Wang
Modified: 2019-05-22 13:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-15 00:16:23 UTC


Attachments (Terms of Use)

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?


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