Bug 1419127

Summary: [RFE] Configure haproxy router logging facility
Product: OpenShift Container Platform Reporter: Sergi Jimenez Romero <sjr>
Component: NetworkingAssignee: Ben Bennett <bbennett>
Status: CLOSED ERRATA QA Contact: Meng Bo <bmeng>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: aos-bugs, bperkins, hongli, jokerman, mmccomas, pweil, zzhao
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Feature: Add environment variable to configure haproxy router logging facility Reason: So that the syslog facility can be set Result: Users can separate their log traffic as desired
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-12 19:11:15 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 Sergi Jimenez Romero 2017-02-03 16:14:49 UTC
> 3. What is the nature and description of the request?  

Current router image template doesn't allow to set logging facility while it does for logging level. 

> 4. Why does the customer need this? (List the business requirements here)  

As a sysadmin , when sending logs from haproxy to other logging endpoints sometimes you need to change the facility.

> 5. How would the customer like to achieve this? (List the functional requirements here)  

Modifying the current image template, it should still default to `local1` but allow customisation for logging facility.

> 6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.  

Example scenario: Using router template, build a new router image setting a user-defined logging facility (i.e. local7), through a variable (i.e. ROUTER_LOG_FACILITY).

> 10. List any affected packages or components.  
router image template

Comment 2 Sergi Jimenez Romero 2017-02-03 16:24:55 UTC
Have created the following PR upstream:

https://github.com/openshift/origin/pull/12795

Comment 4 Ben Bennett 2017-03-28 14:51:13 UTC
This PR was merged in February and will be in the 3.5 release.

Comment 5 Sergi Jimenez Romero 2017-03-28 14:57:48 UTC
(In reply to Ben Bennett from comment #4)
> This PR was merged in February and will be in the 3.5 release.

Thanks for the update Ben, will inform the customer.

Comment 6 zhaozhanqi 2017-03-30 07:39:50 UTC
Verified this bug on 3.5.5 with haproxy image:

registry.ops.openshift.com/openshift3/ose-haproxy-router    v3.5.5              fe47b6d4e2fd

1. setup the env and make sure the router is running
2. set log level:
  oc env dc router ROUTER_SYSLOG_ADDRESS=127.0.0.1 ROUTER_LOG_FACILITY=local2
3. check the router
   oc rsh $router_pod cat haproxy.config | grep log
   log 127.0.0.1 local2 warning

Comment 8 errata-xmlrpc 2017-04-12 19:11:15 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://access.redhat.com/errata/RHBA-2017:0884