Bug 1305166

Summary: [RFE] Allow oo-last-access to ignore user agents
Product: OpenShift Online Reporter: Andy Grimm <agrimm>
Component: ocAssignee: Timothy Williams <tiwillia>
Status: CLOSED WONTFIX QA Contact: Wei Sun <wsun>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: aos-bugs, jgoulding, jokerman, jolamb, mmccomas, rthrashe
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: 2016-04-04 20:34:35 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:    
Bug Blocks: 1277547    
Attachments:
Description Flags
WIP Patch none

Description Andy Grimm 2016-02-05 21:44:08 UTC
Created attachment 1121523 [details]
WIP Patch

As with unidling, it would be useful to be able to ignore certain user agent strings such as bots/spiders when deciding which applications to idle.

Ideally, a single configuration file could be used by both oo-last-access and restorer.php, since the user agent strings would be the same for both.

The attached patch illustrates the idea, but does not implement a configuration option or default location for the config file path yet.  It also matches against the entire apache log line rather than just the user agent string, so we may want to improve that (though if user agent strings are specific enough, it is unlikely that they would match other parts of the log line).  We also may want to sanitize the input before passing it into awk.