deis / fluentd

Log shipping mechanism for Deis Workflow
https://deis.com
MIT License
10 stars 23 forks source link

fix(fluentd): Fix missing container startup logs #77

Closed felixbuenemann closed 7 years ago

felixbuenemann commented 7 years ago

This changes the tail mode for container logs to include the beginning of the file instead of simply tailing it.

This is required, because there is a delay of some seconds between container startup and fluentd picking up the log file and starting to tail it.

The source is already using a pos_file /var/log/containers.log.pos that is persisted on the host filesystem, so even if fluentd crashes or is restarted during upgrades logs are not duplicated.

I have tested this on my clusted using quay.io/felixbuenemann/fluentd:git-7fb4691 and it fixes issues were log messages generated at container startup are missing.

Fixes #76.

deis-admin commented 7 years ago

Thanks for the contribution! Please ensure your commits follow our style guide. This code will be tested once a Deis maintainer reviews it.

deis-bot commented 7 years ago

@jchauncey is a potential reviewer of this pull request based on my analysis of git blame information. Thanks @felixbuenemann!

felixbuenemann commented 7 years ago

I have done the following steps to test this change:

mboersma commented 7 years ago

Jenkins, add to whitelist.