Bug 679879

Summary: Issue: testing using key/value for selection of test host is unreliable
Product: [Retired] Beaker Reporter: PaulB <pbunyan>
Component: testsAssignee: Bill Peck <bpeck>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.7CC: bpeck, dcallagh, jburke, mcsontos, rmancy
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: 2011-04-07 03:39:34 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 PaulB 2011-02-23 18:43:18 UTC
Description of problem:
Running certain tests I need to avoid the selection of a host with specific key/value. However, there is an issue when there are multiple entries for the key/value, as the undersired host can still be chosen.

For instance I need to avoid the selection of a system that has "cciss" key/value. I have tried using both of the following:
------------------------------------------------------------------
<hostRequires>
<and>
 <key_value key="BOOTDISK" op="!=" value="cciss"/>
</and>
</hostRequires>

-and-

<hostRequires>
<and>
 <key_value key="MODULE" op="!=" value="cciss"/>
</and>
</hostRequires>
------------------------------------------------------------------
Issue is when the system has multplie key/vales of BOOTDISK or MODULE,
an undesired system can still be selected.

How reproducible:
See job example in next comment.

Actual results:
System with undesired key/value is selected.

Expected results:
System with undesired key/value omitted.

Additional info:
See next comment for details.

Comment 2 Marian Csontos 2011-02-24 07:50:36 UTC
This is how SQL joins work:
- op="=" -- there exists a node with value equall to the value attribute
- op="!=" -- there exists a node with value not equall to the value attribte

We need a way to request a LEFT OUTER JOINs to specify there is no node (not) matching criteria, e.g.

  <not><key_value .../></not>

Is there a better way?

Comment 3 Bill Peck 2011-03-28 15:47:43 UTC
*** Bug 688906 has been marked as a duplicate of this bug. ***