Bug 1160770

Summary: access to apps via CNAMEs is not counted in last_access
Product: OpenShift Online Reporter: Andy Grimm <agrimm>
Component: ContainersAssignee: Dan McPherson <dmcphers>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.xCC: bmeng, jgoulding, jokerman, mmccomas
Target Milestone: ---   
Target Release: 2.x   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1161244 (view as bug list) Environment:
Last Closed: 2015-02-18 16:52:41 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: 1161244    

Description Andy Grimm 2014-11-05 15:08:41 UTC
Description of problem:

If an openshift app has a cname, the hits to the app's cname are logged with that name in the apache log, and oo-last-access does not count those as "access" for the purpose of keeping an app from idling.

Version-Release number of selected component (if applicable):
rubygem-openshift-origin-node-1.31.9-1.el6oso.noarch

How reproducible:
always

Steps to Reproduce:
1. create an app
2. add a cname
3. access the site by the cname
4. run oo-last-access

Actual results:

oo-last-access for the gear will not reflect the hits to the cname

Expected results:

oo-last-access should count hits to any cname for an app, as well as its "canonical" name.

Comment 1 Andy Grimm 2014-11-05 21:02:13 UTC
Possible solution in https://github.com/a13m/origin-server/commit/a4e1a8b7d7c24736c1a29151e16577d605dd48a9

Could use some optimization, but it worked in my test...

Comment 2 openshift-github-bot 2014-11-06 19:50:40 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/6f9703a5725255607064ad81eca0cf0d1da72eb1
Bug 1160770 - consider CNAMEs when checking last access

Comment 3 Meng Bo 2014-11-07 09:57:30 UTC
Checked on devenv_5286, the access log via alias can be recorded  to .last_access dir when running oo-last-access on node.

Move bug to verified.