Ensure the container bind ports are actually released after removing containers
Open
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
As we have observed in #1431, there is a race condition between Docker's container termination and release of the TCP ports used by the container due to a network proxy process like:`/usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8121 -container-ip 172.18.0.2 -container-port 2379`
Let's apply the same waiting loop to our Backend.AI Agent's `docker` backend to ensure that all TCP ports are actually released after removing the container and before sending the `KernelTerminated` event.
Refer the waiting logic here:https://github.com/lablup/backend.ai/blob/e1d44d69b9c12456bd203848729145ecafb6a55d/tests/common/redis/docker.py#L21
JIRA Issue: BA-198
Contributor guide
Assessment
This issue has not been assessed yet.