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

Failure to cleanup generated docker networks #1097

Closed
AndyGee opened this issue Oct 22, 2018 · 2 comments · Fixed by #1102
Closed

Failure to cleanup generated docker networks #1097

AndyGee opened this issue Oct 22, 2018 · 2 comments · Fixed by #1102

Comments

@AndyGee
Copy link
Contributor

AndyGee commented Oct 22, 2018

Issue Overview

Failure to cleanup docker networks created by the cube framework when the container does not start

Expected Behaviour

Resources that are created automatically (particularly network) should be cleaned up, even on an error.

Current Behaviour

Every failed start still leaves networks in a bad state:

NETWORK ID NAME DRIVER SCOPE
dd4e7f1d6c26 bridge bridge local
63bd4b9e59dd e2e_default bridge local
8090aa381f39 e2e_default bridge local
684be06d1553 e2e_default bridge local
6f9ef479dc05 e2e_default bridge local
7dbaf8babc4d host host local
5ee4042f4095 none null local

Steps To Reproduce
  1. Add any erroneous (one that does not start) container to a docker-compose.yml
  2. Run a test
  3. After a failure to start the test container run docker network ls
  4. Manually delete the network (docker network rm [id]), or repeat step 2 to see multiple network added by cube.
Additional Information

There should be shutdown hooks added to the JVM to ensure resources are cleaned up.

@AndyGee
Copy link
Contributor Author

AndyGee commented Oct 23, 2018

It is starting to look like networks are not cleaned up in general, which leads to duplicate network errors on a second run.

@AndyGee
Copy link
Contributor Author

AndyGee commented Oct 31, 2018

It is lines CubeSuiteLifecycleController#104 and #107 that throws an exception and breaks all cleanups - Thsese lines need to be replaced with log outputs. The @Observes methods must not throw exceptions - This needs to be a golden rule.

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 a pull request may close this issue.

1 participant