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

Abort delayed stop autodiscover events on docker restart #13127

Merged
merged 5 commits into from
Aug 14, 2019

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Jul 31, 2019

If a container is being restarted and cleanup_timeout is greater than
zero (as is by default), the stop event may arrive after the new start,
what stops resources started for the container. This change aborts the
scheduled stops if the same container is started during the grace
period.

cleanup_timeout was added on #10905, in 7.0, and disabled by default in 6.7.

Fix #12962.

@jsoriano jsoriano added bug review libbeat containers Related to containers use case [zube]: In Review Team:Integrations Label for the Integrations team labels Jul 31, 2019
@jsoriano jsoriano requested a review from a team as a code owner July 31, 2019 17:00
@jsoriano jsoriano self-assigned this Jul 31, 2019
If a container is being restarted and `close_timeout` is greater than
zero (as is by default), the stop event may arrive after the new start,
what stops resources started for the container. This change aborts the
scheduled stops if the same container is started during the grace
period.
@jsoriano jsoriano force-pushed the docker-autodiscover-restart branch from 97b41cf to e21f2c8 Compare July 31, 2019 17:01
@jsoriano jsoriano added v7.3.1 needs_backport PR is waiting to be backported to other branches. and removed needs_backport PR is waiting to be backported to other branches. v7.3.1 labels Jul 31, 2019
@jsoriano
Copy link
Member Author

Not sure about backporting this, as it slightly changes the behaviour.

Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pr needs a rebase but other than that, it looks good to me.

@jsoriano
Copy link
Member Author

jenkins, test this again

@jsoriano jsoriano added the test-plan Add this PR to be manual test plan label Aug 14, 2019
@jsoriano jsoriano merged commit cfcef45 into elastic:master Aug 14, 2019
@jsoriano jsoriano deleted the docker-autodiscover-restart branch August 14, 2019 12:00
@exekias
Copy link
Contributor

exekias commented Nov 29, 2019

I saw this cool implementation just now, did you consider doing the same for the Kubernetes provider? it would solve the same issues?

@jsoriano
Copy link
Member Author

I saw this cool implementation just now, did you consider doing the same for the Kubernetes provider? it would solve the same issues?

I don't think that these issues can happen with Kubernetes. Stop events in Kubernetes are caused by destroyed pods, that cannot be restarted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug containers Related to containers use case libbeat needs testing notes review Team:Integrations Label for the Integrations team test-plan Add this PR to be manual test plan v7.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[filebeat] autodiscover remove input after corresponding service restart
4 participants