Repository navigation
fix(local-lab-up): count the scenario's devices in the discover hint - #55
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
At the end of
make local-lab-up, the banner tells you to runmake local-lab-discoverand says "15 devices with interfaces". The number was hardcoded. It is right only for the default scenario (wan-and-fabric).frr-onlyhas 10 devices andnetwork-zoneshas 6, so after bring-up the lab promised more devices than discovery would find. We saw this while bringing up thenetwork-zonesscenario for the release test of 2026-11-09.What changes
gen_clab_topologygets a--device-countquery, in the same mutually exclusive group as--zone-workers,--ready-zonesand--topologies. It prints the number of devices in the scenario'stopology.jsonacross all zones.local-lab-discoverdiscovers the default zone and then each zone, so this count is what discovery fills in.Makefilereads the count intoSCENARIO_DEVICE_COUNTand prints it in the banner. It is a recursive variable, likeCLAB_TOPOLOGIES, so the generator only runs when thelocal-lab-uprecipe expands.tests/test_network_zones.pyadds 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 fornetwork-zones,frr-onlyandwan-and-fabric.Not verified: a real
make local-lab-upagainst containerlab and the stack. Only the generator query and the rendered recipe were checked.The comment above the discover timeout in
Makefilestill says "15 devices". That is left as is on purpose: it explains why the timeout is sized for the largest (default) scenario.