Bug 1059322 - Fix vhost template hostname logging
Summary: Fix vhost template hostname logging
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-29 16:10 UTC by Brenton Leanhardt
Modified: 2017-03-08 17:36 UTC (History)
7 users (show)

Fixed In Version: rubygem-openshift-origin-frontend-apache-vhost-0.2.3-1
Doc Type: Bug Fix
Doc Text:
Existing vhost templates referenced a variable that is only available when using the mod-rewrite front-end proxy plug-in. Therefore, gear server names were not logged in the /var/log/httpd/openshift_log file, causing disruptions in gear idling functions. This bug fix improves the custom access log format to ensure the server name is included, and gear idling functions are no longer impacted. These steps are recommended only for systems where the rubygem-openshift-origin-frontend-apache-vhost package is installed. For the updated package to take effect, the following commands must be run on affected node hosts. Please note that this will cause a node outage, and must be done with care. See the OpenShift Enterprise Administration Guide for full documentation on modifying the front-end proxy server plug-in configuration. # oo-frontend-plugin-modify --save > filename # oo-frontend-plugin-modify --delete # oo-frontend-plugin-modify --restore < filename
Clone Of:
Environment:
Last Closed: 2014-02-25 15:44:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0209 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.0.3 bugfix and enhancement update 2014-02-25 20:40:32 UTC

Description Brenton Leanhardt 2014-01-29 16:10:03 UTC
Description of problem:

Today our vhost templates reference a variable that is only available when using mod-rewrite.  Therefore the servername for an application is not properly logged.

To manually fix this you can edit the following files:

/var/lib/openshift/.httpd.d/frontend-vhost-https-template.erb
/var/lib/openshift/.httpd.d/frontend-vhost-http-template.erb

From there you will need to save, delete and restore the frontends.  This will create an outage on a node so it should be done with care.

See https://access.redhat.com/site/documentation/en-US/OpenShift_Enterprise/2/html-single/Administration_Guide/#Changing_Front-end_HTTP_Server_Plug-in_Configuration for full documentation.

For someone already using the vhost plugin the steps would be as follows:

# oo-frontend-plugin-modify --save > filename
# oo-frontend-plugin-modify --delete
# oo-frontend-plugin-modify --restore < filename

Comment 3 Luke Meyer 2014-01-29 19:27:39 UTC
And the reason we care, I believe, is because this is the log that's used by the idler to determine whether and app has been accessed recently or is a candidate for idling.

Comment 4 Luke Meyer 2014-01-29 20:08:46 UTC
BTW please upstream this change... right?

Comment 5 Andy Goldstein 2014-01-29 20:32:48 UTC
Upstream change is in https://github.com/openshift/origin-server/pull/4604

Comment 6 Brenton Leanhardt 2014-01-29 20:51:52 UTC
Sorry, forgot to include the upstream commit:

commit 1229d591abd961c740f32bbeb94016ad77e8ab43
Author: Andy Goldstein <andy.goldstein>
Date:   Tue Jan 28 11:04:58 2014 -0500

    Fix the Apache vhost plugin
    
    Fix bug in the Apache vhost plugin that prevented it from functioning.
    
    Change V_MATCH_HOST to %v in custom access log format so the server name
    is included in the log (V_MATCH_HOST is only available when using the
    mod rewrite plugin).
    
    Bug 1058849

Comment 8 Peter Ruan 2014-01-31 22:13:41 UTC
verified with puddle-2014-01-30

Comment 10 errata-xmlrpc 2014-02-25 15:44:13 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.

http://rhn.redhat.com/errata/RHBA-2014-0209.html


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