compose/pkg
Milas Bowman 10b290e682 up: fix race condition on network connect
Engine API only allows at most one network to be connected as
part of the ContainerCreate API request. Compose will pick the
highest priority network.

Afterwards, the remaining networks (if any) are connected before
the container is actually started.

The big change here is that, previously, the highest-priority
network was connected in the create, and then disconnected and
immediately reconnected along with all the others. This was
racy because evidently connecting the container to the network
as part of the create isn't synchronous, so sometimes when Compose
tried to disconnect it, the API would return an error like:
```
container <id> is not connected to the network <network>
```

To avoid needing to disconnect and immediately reconnect, the
network config logic has been refactored to ensure that it sets
up the network config correctly the first time.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-06-29 16:00:55 -04:00
..
api introduce run --cap-add to run maintenance commands using service image 2023-06-19 14:20:20 +02:00
compose up: fix race condition on network connect 2023-06-29 16:00:55 -04:00
e2e fix typos 2023-06-27 16:12:25 +02:00
mocks ci: upgrade to Go 1.20.5 and Moby v24.x 2023-06-07 10:41:49 -04:00
progress use `--progress` to configure progress UI stylet push 2023-06-12 16:53:42 +02:00
prompt use a simpler prompt implementation when we lack a terminal 2023-01-09 10:28:16 +01:00
utils assume we receive logs by lines and don't ignore those without EOL 2023-06-07 10:40:37 +02:00
watch fix typos 2023-06-27 16:12:25 +02:00