From fbaaec53327a6afff24036c01e8c273945897225 Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 25 Jun 2025 21:18:49 -0600 Subject: [PATCH] bug: multi-node setup needs unique network names In the case of using Podman (or a runtime that has a shared CNI directory in the user home) and the case that the runtime generates a cni file for each node network, if you have a shared filesystem and a single, non-unique name, each node will write a slightly different address in the CNI file and clobber any previously written files (race condition). This additional make multi-node command will replace "default network" to be specific to the hostname and avoid this. Signed-off-by: vsoch --- README.md | 3 +++ docker-compose.yaml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index db1eccce..48f265ed 100644 --- a/README.md +++ b/README.md @@ -103,8 +103,11 @@ pasta does not seem to work well Use scripts in [`./init-host`](./init-host) for automating these steps. ## Usage + See `make help`. +Here are instructions for control plane and worker nodes. + ```bash # Bootstrap a cluster make up diff --git a/docker-compose.yaml b/docker-compose.yaml index 09707ea4..5c13c5b6 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,7 +8,7 @@ services: privileged: true restart: always networks: - default: + ${HOSTNAME}: ipv4_address: ${NODE_IP} ports: # : @@ -46,7 +46,7 @@ services: "nerdctl/bypass4netns-ignore-bind": "true" "nerdctl/bypass4netns-ignore-subnets": "${BYPASS4NETNS_IGNORE_SUBNETS:-}" networks: - default: + ${HOSTNAME}: ipam: config: # Each of the nodes has to have a different IP.