lablup / lablup/backend.ai

Ensure the container bind ports are actually released after removing containers

Open
#1,461 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.