Skip to content

first version integration test - #15

Open
Santiagocetran wants to merge 7 commits into
mainfrom
feat/integration/test
Open

first version integration test#15
Santiagocetran wants to merge 7 commits into
mainfrom
feat/integration/test

Conversation

@Santiagocetran

Copy link
Copy Markdown
Collaborator

No description provided.

ZeroTier silently blocks non-RFC1918 IPs (like 44.x.x.x) when
allowGlobal=0 (the default). The controller starts before the network
ID is known, so controller-entrypoint.sh cannot pre-seed the config.
Write the .local.conf inside the container right before joining so the
44.30.127.1 IP assignment is accepted and the zt* interface appears.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…er checks

Fixes timeout (exit code 124) when verifying BGP listeners. The issue was:
- Original 30s timeout insufficient for BIRD startup sequence
- No verification that containers were running before checking ports
- Border router could wait up to 60s for zt interface alone

Changes:
- Add explicit container running check before port verification
- Increase BGP listener timeout from 30s to 90s
- Set MAX_WAIT=30 to reduce border router zt interface wait
- Improve wait condition to check for both specific IPs
- Add diagnostic logs for better visibility during startup

Made-with: Cursor
Root cause: Both BIRD containers use --network host and were binding to
0.0.0.0:179 by default. Only one can bind successfully, causing the
second to fail and resulting in 0 BGP listeners.

Critical fix:
- Add "listen bgp address <IP>" to both BIRD configs
- Border router: binds to 172.30.0.100:179 only
- ISP: binds to 172.30.0.1:179 only
- Both can now coexist on host network

Additional diagnostics:
- Show full container logs (not just tail)
- Check BIRD daemon status via birdc
- Display container details with docker ps

Made-with: Cursor
The previous commit added `listen bgp address <IP>` to both BIRD
config templates. This is BIRD 1.6 syntax — BIRD 2.0.12 (installed
from Debian bookworm) rejects it with a parse error, causing both
containers to exit immediately on startup.

Fix:
- Remove `listen bgp address` (BIRD 1.6 global option)
- Add `strict bind yes` inside each protocol bgp block (BIRD 2 way
  to bind the listening socket to the local address)
- Both configs verified with `bird -p` against bird2 2.0.12-7

Also improve the CI wait loop:
- Merge container-running check and listener check into one step
- Fail fast with full logs when a container is already exited
- 90s timeout with progress output showing container state

Made-with: Cursor
Both BIRD containers share the host network namespace (--network host),
so BIRD sees the peer's IP as a local address and refuses to treat it
as a BGP neighbor ("Waiting for X to become my neighbor" → Idle → no
TCP/179 listener ever created).

Fix:
- Add `multihop` to both BGP protocol blocks, bypassing the directly-
  connected neighbor check. BGP connects via regular TCP instead.
- Combined with `strict bind yes` (from previous commit), each BIRD
  listens only on its own IP — no port 179 conflict.
- Switch `log syslog all` → `log stderr all` so BIRD diagnostics
  appear in `docker logs` instead of being lost to a missing syslog.

Verified locally: both listeners on 172.30.0.{1,100}:179, BGP session
Established in ~4s, all 3 test prefixes exchanged.

Made-with: Cursor
The buzondefede/44mesh-zerotier image is minimal and doesn't ship
ping. Install it at test time so the node-to-node connectivity
check can run.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant