Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1161244 - access to apps via CNAMEs is not counted in last_access
access to apps via CNAMEs is not counted in last_access
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers (Show other bugs)
2.2.0
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Brenton Leanhardt
libra bugs
:
Depends On: 1160770
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-06 13:08 EST by Brenton Leanhardt
Modified: 2014-12-10 08:25 EST (History)
9 users (show)

See Also:
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.
Story Points: ---
Clone Of: 1160770
Environment:
Last Closed: 2014-12-10 08:25:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1979 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.2 bug fix and enhancement update 2014-12-10 13:23:46 EST

  None (edit)
Description Brenton Leanhardt 2014-11-06 13:08:13 EST
+++ 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-01 21:13:00 EST
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 08:25:05 EST
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.