Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

journald logs: drain 1 more time at container exit #291

Closed

Conversation

tnozicka
Copy link

resurrected #218 (for master) after @ncdc

I hope it fixes openshift/origin#17747

In the journald log driver, attempt to drain the journal 1 more time
after being told to stop following the log. Due to a possible race
condition, sometimes data is written to the journal at almost the same
time the log watch is closed, and depending on the order of operations,
sometimes you miss the last journal entry.

I'm opening this here for starters so we can discuss. If we decide to proceed with this or something like it, I'll open a pull against docker/docker.

Fixes issues seen in OpenShift e2e tests such as this: openshift/origin#9839 (comment)

/cc @nalind @runcom @rhatdan @smarterclayton @mrunalp @jwhonce @soltysh @mfojtik @deads2k

@runcom
Copy link
Collaborator

runcom commented Dec 13, 2017

@nalind PTAL

@runcom
Copy link
Collaborator

runcom commented Dec 13, 2017

@tnozicka branch is wrong, you need to open this PR against docker-1.12.6 branch

@tnozicka
Copy link
Author

tnozicka commented Dec 13, 2017

oh, that already has it, I guess it just lacked a link in the old PR
https://github.com/projectatomic/docker/blob/docker-1.12.6/daemon/logger/journald/read.go#L262-L269

apologies for the noise

@tnozicka tnozicka closed this Dec 13, 2017
@tnozicka tnozicka deleted the fix-last-line-of-docker-logs branch December 13, 2017 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

container logs lose line(s) (the last one)
2 participants