My setup of 6 containers depends on the IP resolution via hostname for inter-container communication. But it is not working when having more than 4 containers, deployed as a container group to ACI.
I have tested with >= 4 containers and checked the /etc/hosts: Correct entries for all containers created with their hostname there. Good.
When testing with > 4 containers I have to add resource reservation entries to my docker-compose.yml to stay below the 4 core limit of ACI. I can deploy the whole group of 6 containers successfully but there are not container name entries created in /etc/hosts.
Used region for tests: West US
Differences I noted in both cases, connecting to the container (bash)
<= 4 containers:
- The hostname starts with "SandboxHost-...."
-
uname -a
-> "Linux SandboxHost-637699780050910076 5.4.81-microsoft-standard #1 SMP Thu Dec 3 23:47:24 UTC 2020 x86_64 GNU/Linux"
4 containers
- The hostname starts with "wk-caas-...."
-
uname -a
-> "4.15.0-1113-azure #126~16.04.1-Ubuntu SMP Tue Apr 13 16:55:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux"
Strange fact: I also got a failing container group (wk-caas) with 2 containers using region West Europe. Not sure if that's reproducable.
I have invested many hours into this issues trying lots of stuff and making sure it is not my fault. I am increasingly convinced that this is a bug in ACI that someone needs to have a look at.
I have tried deployment with both docker compose ACI integration and also YAML file with az container.
Any help/tips highly appreciated!
Daniel