Bug 1534827
| Summary: | docker journald log driver keeps file descriptors to deleted /var/log/journal/*/*.journal files | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Takayoshi Kimura <tkimura> |
| Component: | docker | Assignee: | Nalin Dahyabhai <nalin> |
| Status: | CLOSED ERRATA | QA Contact: | atomic-bugs <atomic-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.3 | CC: | 42wimdroid, amurdaca, dornelas, fshaikh, jamills, jkaur, jtudelag, kwalker, lsm5, pportant, rhowe, rkharwar, rmeggins, sakulkar, santiago, schoudha, stwalter |
| Target Milestone: | rc | Keywords: | Extras |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | docker-1.13.1-52.gitce62987.el7_4 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-03-07 09:51:51 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: | 1186913, 1513780 | ||
|
Description
Takayoshi Kimura
2018-01-16 02:53:44 UTC
To workaround, truncate the deleted files manually in a cron job:
# cd /proc/`pidof dockerd-current`/fd
# ls -l |grep var.log.journal |grep deleted.$ |awk '{print $9}' |while read x; do :> $x; done;
Is it docker code that is doing this? Or is this really the systemd journal API interfaces doing this? The reason to ask is because we seem the same behavior with rsyslog configured to use imjournal. It looks like the journal reading logic in dockerd isn't handling SD_JOURNAL_INVALIDATE status results from sd_journal_process(), which would be a good time for it to close and reopen the handle that it's using to follow the journal as entries get added to it. A patch to handle that shouldn't be very large. It looks like rsyslog already handles this, see https://github.com/rsyslog/rsyslog/blob/v8-stable/plugins/imjournal/imjournal.c#L505 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-2018:0436 This issue still exists in docker-1.13.1-103.git7f2769b I'm using the truncate deleted files workaround, at the moment, but upstream now has recently fixed this in https://github.com/moby/moby/pull/38859 Can this be backported? |