Bug 1161244 - access to apps via CNAMEs is not counted in last_access
Summary: access to apps via CNAMEs is not counted in last_access
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1160770
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-06 18:08 UTC by Brenton Leanhardt
Modified: 2014-12-10 13:25 UTC (History)
9 users (show)

Fixed In Version: openshift-origin-node-util-1.31.3.1-1
Doc Type: Bug Fix
Doc Text:
Previously when determining the last access time for a gear, the oo-last-access command did not count access via application aliases. This caused the command to return inaccurate last access information. This bug fix updates the oo-last-access command to also check for access via application aliases, and as a result the command output is now more accurate.
Clone Of: 1160770
Environment:
Last Closed: 2014-12-10 13:25:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1979 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.2 bug fix and enhancement update 2014-12-10 18:23:46 UTC

Description Brenton Leanhardt 2014-11-06 18:08:13 UTC
+++ This bug was initially created as a clone of Bug #1160770 +++

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.

--- Additional comment from Andy Grimm on 2014-11-05 16:02:13 EST ---

Possible solution in https://github.com/a13m/origin-server/commit/a4e1a8b7d7c24736c1a29151e16577d605dd48a9

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

Comment 3 Ma xiaoqiang 2014-12-02 02:13:00 UTC
Check on puddle [2.2.2/2014-11-26.3]

1. Create app on node.
#rhc app create testapp python-2.6
2. Add alias to the app.
#rhc alias add testapp.com -a testapp
3. Access the app via the alias
#echo testapp.com   $node_ip  >>/etc/hosts
#curl testapp.com
4. Run oo-last-access on node, and check the .last_access
#oo-last-access 
#cat 547d183fe5fed55d02000047 
02/Dec/2014:10:07:33 +0800

Comment 5 errata-xmlrpc 2014-12-10 13:25:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2014-1979.html


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