test: take the lab management prefix from the environment - #506
Merged
Conversation
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.
Problem
Every integration topology hard-codes its management subnet under 172.20.0.0/16: 34 suites share
clabon 172.20.20.0/24 and 19 keep a suite-private network on a distinct third octet. On a box where another Docker network already owns 172.20.0.0/16, containerlab refuses to create the management network and no suite can deploy. The only way to run the rig there was to edit 53 topology files or copy suites aside, which is how the #505 verification had to be done.Change
The /16 comes from the environment for the 34 suites on the shared
clabnetwork:ipv4-subnet: ${OSVBNG_LAB_MGMT_PREFIX:=172.20}.20.0/24. The 19 suites with a private management network keep their literal 172.20 subnet on purpose: they pin each node'smgmt-ipv4, and their bind-mounted RADIUS, Kea and robot files name those addresses, which containerlab does not expand. Moving only their subnet leaves the node outside its own network andcontainerlab deployhangs, which the first version of this change did and a local sweep caught; the second commit reverts those 19 topologies and the docs say why.common.robotcarries the variable throughsudo --preserve-envbeside the core-slot variables, and the topology invariant indocs/contributing/ci-and-review.mddocuments it. Unset, every file expands to exactly what it said before, so the CI runner (which pre-createsclabon 172.20.20.0/24) is unaffected.Verification
On a box with 172.20.0.0/16 taken:
OSVBNG_LAB_MGMT_PREFIX=172.31runs the shared-network suites from #505's verification (53, 24, 08, 10 and the sweep recorded there) on 172.31.20.0/24. With the variable unset,git diffagainst main is the one line per shared-network topology and nothing else changes. The private-network suites were not runnable on that box before this change and are not after it; they run on the CI runner, where 172.20 is free.