Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1335939

Summary: Installer should configure docker logging
Product: OpenShift Container Platform Reporter: Robert Rati <rrati>
Component: InstallerAssignee: Andrew Butcher <abutcher>
Status: CLOSED ERRATA QA Contact: Ma xiaoqiang <xiama>
Severity: medium Docs Contact:
Priority: high    
Version: 3.2.0CC: aos-bugs, bleanhar, dwalsh, erich, gpei, jeder, jialiu, jkaur, jokerman, mmccomas, pportant, rmeggins, tstclair, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-ansible-3.2.1-1.git.0.b8d1b5e.el7 Doc Type: Enhancement
Doc Text:
Installer will now configure docker logging options by default, enabling a 50mb log size limit with one rolling log file. These settings may be overridden by specifying the openshift_docker_options inventory variable, for example: openshift_docker_options="--log-driver=json-file --log-opt max-size=50m -l warn --ipv6=false".
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-27 15:04:25 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:
Bug Depends On:    
Bug Blocks: 1267746, 1335941    

Description Robert Rati 2016-05-13 15:05:10 UTC
Description of problem:
Containers that generate a lot of docker logs can result in filling up the disk containing docker's logs.  Currently there is no management of the docker logs generated by containers.  The installer should configure docker logging to manage log files.  There are a couple of options I see:

1) Configure docker's log rotation functionality
2) Configure docker to log to systemd

I believe 2 is how this problem is handled in atomic.

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

How reproducible:
100%

Steps to Reproduce:
1. Run a container that generates a lot of docker logs
2. Wait
3.

Actual results:


Expected results:


Additional info:

Comment 3 Timothy St. Clair 2016-05-24 14:33:04 UTC
There is an issue when we try to configure the docker logging driver to use the journal logging, where fluentd will no longer collect and forward the logging data.

Comment 4 Rich Megginson 2016-05-24 15:23:45 UTC
one of the problems is that the https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter/blob/master/lib/fluent/plugin/filter_kubernetes_metadata.rb was designed specifically to work with the fluentd in_tail plugin with JSON formatted files in /var/log/containers/*.log.  I'm currently working on allowing this plugin to work with the fluentd in_journal record format.

Comment 7 Andrew Butcher 2016-06-03 15:29:33 UTC
PR https://github.com/openshift/openshift-ansible/pull/1976

Comment 10 Ma xiaoqiang 2016-06-12 06:27:26 UTC
Check on openshift-ansible-3.2.1-1.git.0.b8d1b5e

Install env with default configuration

Check the docker option after installation
OPTIONS=' --selinux-enabled --insecure-registry=172.31.0.0/16 --log-driver=json-file --log-opt max-size=50m'

the default docker log option take effect, move this issue to VERIFIED.

Comment 11 Johnny Liu 2016-06-12 09:21:10 UTC
Add more test result based on comment 10, when user specifying   'openshift_docker_options="-l warn --ipv6=false"', the default docker option - '--log-driver=json-file --log-opt max-size=50m' will be overwritten like the following:
OPTIONS=' --selinux-enabled --insecure-registry=172.30.0.0/16 -l warn --ipv6=false'

Comment 12 Andrew Butcher 2016-06-21 15:11:04 UTC
*** Bug 1342544 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2016-06-27 15:04:25 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-2016:1344