L2 subnet topology + netcfg CLI #82
Draft
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.
Summary
This PR adds support for a low-level L2 network creation between peer nodes that avoids the broadcast storms from #69
Changes
API Node builds a low-level L2 network topology plan during prepare_topology call from the solver-level generated topology. It then transmits this plan as JSON routes to workers.
Shard Nodes receives the JSON plan and invokes the new dnet-netcfg tool (bridges, /31 addressing, routes, MTU rate, etc.)
netcfg: new macOS CLI that:
netcfg requires sudo for some commands. It fails with permission errors on which the API Node prompts the user for the password of that specific peer. Once a password is given once netcfg registers itself with NOPASSWD via visudo in sudoers. It also moves itself in /opt/homebrew/bin because of the safe path requirement of visudo and modifies it's permissions.
unit test netcfg tool
Type of Change
Mark the relevant option with an 'x'
Testing
Describe the tests you ran and/or how to test these changes
Checklist
Closes #
#69