Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1134034 - RFE: Need a "parallel" logging option in logshifter to log using both file and syslog
RFE: Need a "parallel" logging option in logshifter to log using both file an...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers (Show other bugs)
2.1.0
x86_64 Linux
high Severity medium
: ---
: ---
Assigned To: Scott Dodson
libra bugs
: Upstream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-26 12:33 EDT by Eric Sauer
Modified: 2014-10-02 09:59 EDT (History)
15 users (show)

See Also:
Fixed In Version: openshift-origin-logshifter-1.5.2.1-1
Doc Type: Enhancement
Doc Text:
Because node host administrators may want to have logging consolidated via Syslog while gear users may wish to have logs written to the application root directory, nodes now support log delivery to both Syslog and file output types at the same time. Administrators can set the 'outputType' in the /etc/openshift/logshifter.conf file on node hosts to 'multi', which results in logs being written to both 'file' and 'syslog'.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-02 09:59:45 EDT
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:1353 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.7 bug fix and enhancement update 2014-10-02 13:59:00 EDT

  None (edit)
Description Eric Sauer 2014-08-26 12:33:21 EDT
Description of problem:
Our customer has a requirement to log both to local files (for admins/developer use for debugging) and to syslog, so they can have a central logging server for security auditing. We would like to add a third configuration option for 'outputtype' with value 'parallel', which logs using both the FileWriter and SyslogWriter.

Version-Release number of selected component (if applicable):
OSE 2.1

Additional info:
I have implemented this for testing purposes at: https://github.com/etsauer/logshifter
Comment 3 Andy Goldstein 2014-08-26 13:08:14 EDT
FYI, the latest logshifter code is in origin-server: https://github.com/openshift/origin-server/tree/master/logshifter.

This seems reasonable to me.
Comment 4 Brenton Leanhardt 2014-08-26 13:34:10 EDT
Would we want to allow for the logshifter output type to be a list of writers?

Writing to both locations would involve setting 'outputType=syslog,file' instead of creating a new type of writer. Having admins put 'outputType=parallel' would sort of back us in the corner in the case of adding a third option (that could potentially be combined with the other two in some way).

We wouldn't necessarily need to do anything fancy right now though.  The implementation could largely be the same.  It could be as simple as checking for permutations of 'syslog,file' for the outputType setting.
Comment 5 Luke Meyer 2014-08-26 14:36:14 EDT
After a bit more discussion, I think the proposed approach is good. I don't think there is much need for options beyond syslog, file, and both; the purpose of logshifter isn't to be a generic log tool, just to deal with the inside-gear vs syslog dichotomy.

It may be possible to have syslog split logs back to the gear, but I suspect it's simpler in several ways to just complete this final option on logshifter.
Comment 6 Dan Mace 2014-08-26 14:43:03 EDT
Just throwing in my +1 here: a narrowly-scoped combined option would be useful and straightforward to introduce.
Comment 7 Eric Sauer 2014-08-26 16:07:55 EDT
Created a PR with multi_writer changes here: https://github.com/openshift/origin-server/pull/5758
Comment 8 Eric Sauer 2014-09-02 13:40:24 EDT
PR was tested and merged last week. What are the next steps to get this into OSE?
Comment 9 Luke Meyer 2014-09-02 15:02:29 EDT
Thanks for bumping this. Basically it is up to the OSE team to cherry-pick the changes into 2.1 (or decide to just wait for 2.2 to be released). Bumping priority so it'll be on our radar.
Comment 10 Scott Dodson 2014-09-04 16:30:00 EDT
Eric,

I'm looking over this and familiarizing myself with logshifter. I'll likely get a PR in for 2.1.7 in order to ensure QA has adequate time to test.

--
Scott
Comment 13 Anping Li 2014-09-09 22:52:00 EDT
Verified and pass on puddle-2-1-2014-09-09
set outputtype = file in logshifter.conf.
1) tailf /var/messages and check the log files under /var/lib/openshift/$uuid/app-root/. 
2) Gears logged into file. No gears logged into /var/log/messages.

set outputtype = syslog in logshifter.conf
1) tailf /var/message and check the log files under /var/lib/openshift/$uuid/app-root/. 
2) Gears logged into /var/log/messages. No gears logged into /var/lib/openshift/$uuid/app-root/logs

set outputtype = multi logshifter.conf
1) tailf /var/message and check the log files under /var/lib/openshift/$uuid/app-root/. 
2) Gears logged into /var/log/messages and /var/lib/openshift/$uuid/app-root/logs
Comment 15 errata-xmlrpc 2014-10-02 09:59:45 EDT
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-1353.html

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