Bug 888048

Summary: Negative hostRequires filters can select systems which have never been inventoried
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: inventoryAssignee: beaker-dev-list
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.10CC: asaha, bpeck, dcallagh, llim, qwan, rglasz, rmancy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Misc
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 886820 Environment:
Last Closed: 2013-04-15 05:25:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dan Callaghan 2012-12-17 22:19:16 UTC
+++ This bug was initially created as a clone of Bug #886820 +++

--- Additional comment from Bill Peck on 2012-12-13 23:56:00 EST ---

Hi Marian,

I believe the following will work for you..

bkr list-systems --xml-filter '<device type="VIDEO"/>'


To do the negative you need to be careful though, since machines that haven't been inventoried will show up as well.  So I did a query where I added device type NETWORK.

bkr list-systems --xml-filter '<device op="!=" type="VIDEO"/><device type="NETWORK"/>'

Comment 1 Dan Callaghan 2012-12-17 22:21:40 UTC
If a recipe's <hostRequires/> contains filters for any inventory fields which can only be populated by the inventory script (devices are one example from the original bug), and inventory has never been run on a system, then it should be filtered out as a candidate for the recipe. Beaker can't be sure if the system does or does not satisfy the filter criteria.

Ultimately Beaker admins should always make sure to keep systems regularly inventoried but that does not always happen...

Comment 2 Nick Coghlan 2013-04-15 05:25:42 UTC
Closing as a dupe, since the other issue actually has a patch.

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