Bug 1381727 - docker fills /var/lib/docker/containers with logs - needs a logrotate config file
Summary: docker fills /var/lib/docker/containers with logs - needs a logrotate config ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 3.3.0
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: DeShuai Ma
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-04 20:22 UTC by Dan Yocum
Modified: 2016-10-05 00:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-04 20:51:17 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dan Yocum 2016-10-04 20:22:52 UTC
Description of problem:

$subject says it all

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

v3.2, at least

How reproducible:

always

Steps to Reproduce:
1. start your containers
2. watch /var/lib/docker/container/ dirs fill with logs w/o ever being rotated

Actual results:

/var fills up

Expected results:

/var doesn't fill up

Additional info:

An /etc/logrotate.d/docker config file should ship with docker.  Something like this:

/var/lib/docker/container/*/*-json.log {
    notifempty
    monthly
    rotate 5
    missingok
    compress
    copy-truncate
}

Comment 1 Dan Yocum 2016-10-04 20:51:17 UTC
Errr, um.  Apparently, there's an option to limit the log size in docker:

--log-opt max-size=XXm

So, with that in mind, I'm going to close it.


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