Skip to content

Commit d5eb4a4

Browse files
authored
Merge pull request #574 from Dstack-TEE/fix/gateway-cluster-sync-bootstrap
fix(gateway): enable cluster sync without requiring BOOTNODE_URL
2 parents 7503f4f + d371975 commit d5eb4a4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

gateway/dstack-app/builder/entrypoint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ if [[ ! "$NODE_ID" =~ ^[0-9]+$ ]]; then
4343
exit 1
4444
fi
4545

46-
SYNC_ENABLED=$([ -z "$BOOTNODE_URL" ] && echo "false" || echo "true")
46+
# Sync is always enabled when NODE_ID > 0. Peer auto-discovery works via incoming
47+
# sync connections: when another node syncs to us, we learn about it automatically
48+
# through WaveKV's handle_sync, which auto-adds the sender as a peer.
49+
# BOOTNODE_URL is optional — it speeds up initial discovery but is not required.
50+
SYNC_ENABLED=$([ "$NODE_ID" -gt 0 ] && echo "true" || echo "false")
4751

4852
echo "WG_IP: $WG_IP"
4953
echo "WG_RESERVED_NET: $WG_RESERVED_NET"

0 commit comments

Comments
 (0)