-
Notifications
You must be signed in to change notification settings - Fork 98
Fix: Cannot use netlab_config_mode on Linux #3040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@sdargoeuves -- This should make your pings work. Apologies for the blunder; I never used custom config templates on Linux nodes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes an issue where the netlab_config_mode variable could not be used on Linux containers to control custom configuration deployment. The fix allows users to set netlab_config_mode for custom configuration templates while ensuring that built-in modules (initial, lag, vlan, routing) continue to execute in the container namespace using the ip command on the host.
Changes:
- Replaced the global
netlab_config_mode: nsgroup variable with explicitnode_configentries for initial, lag, vlan, and routing modules - Updated documentation to clarify Linux device image defaults, configuration mechanisms, and the proper use of
netlab_config_modefor custom configurations - Fixed a documentation reference link from
labs/linux.mdtogeneric-linux-devices
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| netsim/devices/linux.yml | Added explicit node_config entries for initial/lag/vlan/routing modules and removed the global netlab_config_mode variable |
| docs/platforms.md | Fixed internal link reference to use the correct anchor for Linux devices |
| docs/labs/linux.md | Improved clarity and accuracy of Linux device documentation, including version updates, configuration mechanism descriptions, and guidance on using netlab_config_mode |
The 'netlab_config_mode' variable cannot be used on Linux as the custom configuration templates might have to be executed within the containers while the initial device configuration must be executed on host (within the container namespace) because some containers might not have the 'ip' command. Fixes #3039
Maybe it could be worth adding a new integration test that "run" a simple config template - with a template for every supported platform? |
sdargoeuves
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, it does the trick. Thank you so much for the quick fix!
We have it for most platforms -- every time you implement a plugin (for example, bgp.sessions or ospf.areas) for a platform you use a custom configuration template. Linux is one of those few platforms that are not supported by any tested plugin (I'm afraid to test the bonding plugin 😜, but even there, the commands would be executed on host in container namespace). Anyway, the |
The 'netlab_config_mode' variable cannot be used on Linux as the custom configuration templates might have to be executed within the containers while the initial device configuration must be executed on host (within the container namespace) because some containers might not have the 'ip' command.
Fixes #3039