Kafka Redpanda container not stopped and delete on application end #22532
-
While developing an application using Kafka Streams using then Kafka Dev Services, we know that a Redpanda based Kafka broker is started in a container: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
634a0bfbe491 vectorized/redpanda:v21.5.5 "sh -c 'while [ ! -f…" 7 hours ago Up 7 hours 9644/tcp, 0.0.0.0:49154->9092/tcp, :::49154->9092/tcp hungry_heisenberg When is it supposed to be stopped and removed? When I stop my application it doesn't happen. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
/cc @cescoffier, @ozangunalp |
Beta Was this translation helpful? Give feedback.
-
Let me clarify two things here: 1/ Test containers does not run ryuk container in privileged mode by default. That is the reason it didn't work for you in the first place. Seems like there is a particular issue with Fedora: testcontainers/testcontainers-java#4014. I personally would qualify this as a non-issue as it doesn't impact most people and if it does there are multiple workarounds. 2/ There is actually two safeguards for stopping and deleting the dev service container. The first one is on the Quarkus end: we close and delete the container on the application exit. Second one is on the test containers end, with or without ryuk, it registers a runtime hook for cleaning up the container. Of course, if the process quits abruptly, (ex. with |
Beta Was this translation helpful? Give feedback.
Let me clarify two things here:
1/ Test containers does not run ryuk container in privileged mode by default. That is the reason it didn't work for you in the first place. Seems like there is a particular issue with Fedora: testcontainers/testcontainers-java#4014. I personally would qualify this as a non-issue as it doesn't impact most people and if it does there are multiple workarounds.
2/ There is actually two safeguards for stopping and deleting the dev service container. The first one is on the Quarkus end: we close and delete the container on the application exit. Second one is on the test containers end, with or without ryuk, it registers a runtime hook for cleaning up the containe…