Bug 888048 - Negative hostRequires filters can select systems which have never been inventoried
Summary: Negative hostRequires filters can select systems which have never been invent...
Keywords:
Status: CLOSED DUPLICATE of bug 912607
Alias: None
Product: Beaker
Classification: Retired
Component: inventory
Version: 0.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact:
URL:
Whiteboard: Misc
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-17 22:19 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
7 users (show)

Fixed In Version:
Clone Of: 886820
Environment:
Last Closed: 2013-04-15 05:25:42 UTC
Embargoed:


Attachments (Terms of Use)

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 ***


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