Skip to content

fix(local-lab-up): count the scenario's devices in the discover hint - #55

Merged
leandrolerena merged 1 commit into
developfrom
fix/lab-banner-lab
Nov 10, 2026
Merged

leandrolerena merged 1 commit into
developfrom
fix/lab-banner-lab

Conversation

@leandrolerena

Copy link
Copy Markdown
Member

What was wrong

At the end of make local-lab-up, the banner tells you to run make local-lab-discover and says "15 devices with interfaces". The number was hardcoded. It is right only for the default scenario (wan-and-fabric). frr-only has 10 devices and network-zones has 6, so after bring-up the lab promised more devices than discovery would find. We saw this while bringing up the network-zones scenario for the release test of 2026-11-09.

What changes

  • gen_clab_topology gets a --device-count query, in the same mutually exclusive group as --zone-workers, --ready-zones and --topologies. It prints the number of devices in the scenario's topology.json across all zones. local-lab-discover discovers the default zone and then each zone, so this count is what discovery fills in.
  • Makefile reads the count into SCENARIO_DEVICE_COUNT and prints it in the banner. It is a recursive variable, like CLAB_TOPOLOGIES, so the generator only runs when the local-lab-up recipe expands.
  • tests/test_network_zones.py adds two tests: one for the generator query (6, 10, 15) and one for the Makefile expansion.

Verification CI does not do

  • make -n local-lab-up SCENARIO=<scenario> prints 6, 10 and 15 devices for network-zones, frr-only and wan-and-fabric.

Not verified: a real make local-lab-up against containerlab and the stack. Only the generator query and the rendered recipe were checked.

The comment above the discover timeout in Makefile still says "15 devices". That is left as is on purpose: it explains why the timeout is sized for the largest (default) scenario.

The banner said 15 devices for every scenario; frr-only has 10 and
network-zones 6. gen_clab_topology --device-count reports it from the
scenario's topology.
@leandrolerena leandrolerena added the pr-bugfix PR introduces a bugfix label Nov 9, 2026
@leandrolerena leandrolerena self-assigned this Nov 9, 2026
@leandrolerena
leandrolerena merged commit b5eee3c into develop Nov 10, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix PR introduces a bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant