Feature/multiserver plugin#3421
Conversation
ipspace
left a comment
There was a problem hiding this comment.
Super-awesome-job!!! Thanks a million.
Tons of comments (as you expected ;). Some of them are just suggestions or pointers to existing helper functions, in other cases I think we can make the whole thing a lot more streamlined with significant rewrites.
|
I guess about 99% of them are valid 😁 |
Refactor & review-response changelogclab.yml generation
Data types
Servers as a dictionary
CLI hooks for VXLAN setup/teardown
Single-server
|
|
A few quick thoughts -- more details after I implement the hooks this needs and we rebase it.
Will cherry-pick this change into a new PR. Don't want to have this hidden in a large blob of unrelated code.
👍
👍
That's a huge can of worms. We need the absolute paths in the snapshot and in the Ansible inventory. I think it would be best to have a plugin hook executed very early in "netlab up" so it can adjust the topology data and recreate the snapshot and Ansible inventory before "netlab up" does some real work.
It's resolved from the current installation path in make_paths_absolute
Unless you install netlab as root on lab VMs and in virtual environment on your local machine.
Agreed. That whole thing has to be solved in a different way. |
ipspace
left a comment
There was a problem hiding this comment.
A mixed bag of nits, things that should be fixed (more info on replicated nodes, default server uplink interface name...), and Another Grand Idea (😜). I'm perfectly fine if you tell me to defer the Grand Idea to a later time and just merge this thing.
| # Register atexit handler to copy node_files, host_vars, etc. into each server | ||
| # folder after netlab writes all output files. | ||
| if server_folders: | ||
| import atexit |
There was a problem hiding this comment.
The "post-output" callback is there. Please use that.
|
@Muddyblack -- I'm sorry for the long delay. I wanted to push the June release out before Autocon5 (and it turns out one has a limited daily amount of mental energy as one gets older), and then Autocon5 struck (just joking, it was a great conference). Anyway, I think we should implement multi-access links with bridge nodes in the long run to make your life easier. I could even make that functionality part of netlab core (in the "bridge" role) to have it available regardless of whether the user uses this plugin. Hey, maybe I could even do that by default just to simplify containerlab provisioning (no need for "manual" creation of Linux bridges). Whether we do that as part of this PR, or merge this and then work on that, is completely up to you. Just let me know ;) |
|
Update: the "implement clab multi-access networks with bridge nodes" idea is much harder to implement than I thought if we want to support VLAN trunks or routed VLANs across multi-access networks -- we would have to split the multi-access link into P2P links very late in the transformation process. For the moment, let's fix the other stuff and move forward with this. When I implement that other idea, the multi-access part of the code in this PR will become irrelevant, at which point we can do a cleanup. |
|
No Problem some time off the computer and charge energy is also good for me ;) |
…re/multiserver-plugin
|
Just a note: Is that intended? |
Hm I see it uses the entire pr not just latest commits or so and would require a own job or so. |
Reference: #3420
Summary
This PR adds the
multiserverplugin to distribute a single Netlab topology across multiple physical servers.Sadly for now containerlab-provider only.
Key Details
netsim/extra/multiserver/and doesn't modify any core Netlab engine logic.clab.ymlandnetlab.snapshot.pickle.sudo netlab up --snapshot -vvwithout needing custom CLI options.For the test-files I am not sure if they make any sense. But they show at least it does not interfere with the normal netlab workflow.
Explanations on how it works can be found in
docs/plugins/multiserver.md.