Bug 1335939 - Installer should configure docker logging
Summary: Installer should configure docker logging
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Andrew Butcher
QA Contact: Ma xiaoqiang
URL:
Whiteboard:
: 1342544 (view as bug list)
Depends On:
Blocks: 1267746 1335941
TreeView+ depends on / blocked
 
Reported: 2016-05-13 15:05 UTC by Robert Rati
Modified: 2016-11-25 07:53 UTC (History)
14 users (show)

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".
Clone Of:
Environment:
Last Closed: 2016-06-27 15:04:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1344 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise atomic-openshift-utils bug fix update 2016-06-27 19:03:23 UTC

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


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