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

docker event for exec_die #35702

Closed
ndeloof opened this issue Dec 5, 2017 · 4 comments
Closed

docker event for exec_die #35702

ndeloof opened this issue Dec 5, 2017 · 4 comments
Labels
kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.

Comments

@ndeloof
Copy link
Contributor

ndeloof commented Dec 5, 2017

Description

As a container terminate by itself (main PID 1 process complete) an container die event is reported with exit code.
As an exec process completes, docker inspect do report updated ExecIDs set but no event is logged. As a result, one only can monitor exec completion by polling. An container exec_die event would allow an asynchronous implementation.

My actual use case is to run build processes in an existing containers from a Jenkins plugin. I'd like to avoid polling this container for exec completion.

Steps to reproduce the issue:

  1. run docker event
  2. start a container with sleep 100
  3. run docker exec ID echo hello

Describe the results you received:

logged events:

  • container exec_create
  • container exec_start
  • container die

Describe the results you expected:

logged events:

  • container exec_create
  • container exec_start
  • container exec_die
  • container die
@thaJeztah thaJeztah added the kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. label Dec 7, 2017
@thaJeztah
Copy link
Member

Discussing this in the maintainers meeting, and we think adding these events make sense.

There is some discussion around order of events for container die and container exec_die (weren't sure if they can guaranteed to arrive in the correct order); that may need some research.

Are you interested in implementing this?

@ndeloof
Copy link
Contributor Author

ndeloof commented Dec 7, 2017

Yes, thanks !

@ndeloof
Copy link
Contributor Author

ndeloof commented Dec 7, 2017

I'm not worried about the arrival order, could just be documented not to be guaranteed if there's a risk for some race condition.
For my own use-case I just need some way to know an exec completed without polling.

@ndeloof
Copy link
Contributor Author

ndeloof commented Dec 8, 2017

#35744

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.
Projects
None yet
Development

No branches or pull requests

2 participants