Skip to content

Conversation

@ipspace
Copy link
Owner

@ipspace ipspace commented Jan 24, 2026

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

@ipspace
Copy link
Owner Author

ipspace commented Jan 24, 2026

@sdargoeuves -- This should make your pings work. Apologies for the blunder; I never used custom config templates on Linux nodes.

Copy link

Copilot AI left a 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: ns group variable with explicit node_config entries for initial, lag, vlan, and routing modules
  • Updated documentation to clarify Linux device image defaults, configuration mechanisms, and the proper use of netlab_config_mode for custom configurations
  • Fixed a documentation reference link from labs/linux.md to generic-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
@ssasso
Copy link
Collaborator

ssasso commented Jan 24, 2026

I never used custom config templates on Linux nodes.

Maybe it could be worth adding a new integration test that "run" a simple config template - with a template for every supported platform?

Copy link
Collaborator

@sdargoeuves sdargoeuves left a 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!

@ipspace
Copy link
Owner Author

ipspace commented Jan 25, 2026

Maybe it could be worth adding a new integration test that "run" a simple config template - with a template for every supported platform?

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 platform-integration/config/01-initial.yml test now includes custom config template for Linux.

@ipspace ipspace merged commit e9be28e into dev Jan 25, 2026
12 checks passed
@ipspace ipspace deleted the linux-cfg branch January 25, 2026 08:45
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.

[BUG] failed to push custom config to linux host

4 participants