Bug 912607

Summary: Exclude uninventoried systems from inventory dependent searches
Product: [Retired] Beaker Reporter: Nick Coghlan <ncoghlan>
Component: schedulerAssignee: beaker-dev-list
Status: CLOSED WONTFIX QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.11CC: qwan, tools-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Inventory
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-21 14:13:30 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:
Bug Depends On: 959023    
Bug Blocks:    

Description Nick Coghlan 2013-02-19 07:38:49 UTC
Currently, when searching for systems which *don't* have a particular feature that is populated by the inventory script, Beaker will happily include systems that haven't been inventoried at all in the results.

This is incorrect - if a user says "give me a system without a graphics card" a system that "may or may not have a graphics card, we don't know" isn't likely to be a desirable answer.

When an affected feature is mentioned in a system query (whether through the web UI or through the job XML), uninventoried systems should be excluded from the results automatically.

Comment 1 Raymond Mancy 2013-02-25 05:13:19 UTC
In the WebUI the way to search for something that is not inventories is to 
search for:

[System/<X> [is] [  ] (i.e blank).

Anywhere where the value is left blank, it checks for NULL or ''.

Comment 2 Dan Callaghan 2013-03-13 22:26:11 UTC
On the hostRequires side of things, I think we need to add some code so that any criteria which touch fields populated by the inventory script (which is most of them, but not all) would also apply a filter System.date_lastcheckin != None, to exclude systems which have never been inventoried.

For the web UI search, I'm not so sure.

Comment 3 Amit Saha 2013-04-10 04:37:48 UTC
On Gerrit: http://gerrit.beaker-project.org/#/c/1872/

Comment 8 Nick Coghlan 2013-04-15 05:25:42 UTC
*** Bug 888048 has been marked as a duplicate of this bug. ***

Comment 12 Dan Callaghan 2013-05-03 01:47:46 UTC
Dropping this from 1.0 for now, because there is some contention about the proposed fix:

* Filtering for date_lastcheckin != None for some fields but not other will give inconsistent behaviour, which might be surprising to users and hard to document.

* The search bar code in its current state does not make it easy to add this extra filter cleanly for all relevant fields, so the implementation is somewhat hacky.

Bug 949777 will give the ability to find uninventoried systems (in order to inventory them) and to filter out uninventoried systems explicitly if desired. So we believe this bug will not be a serious issue.

Comment 14 Nick Coghlan 2013-09-06 00:17:31 UTC
Kicking back to NEW, since if we do this, we won't do it the way the linked Gerrit patch proposes.