Bug 1059322

Summary: Fix vhost template hostname logging
Product: OpenShift Container Platform Reporter: Brenton Leanhardt <bleanhar>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.0.0CC: adellape, agoldste, cryan, jolamb, libra-onpremise-devel, lmeyer, pruan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-25 15:44:13 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:

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