Skip to content

Conversation

@GandalfTea
Copy link
Contributor

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:

    • intakes plan from shard node in JSON form and applies it, validates it and optionally creates a new network service to persist interfaces across reboots.
    • handles virtual bridge creation/destruction, member iface attachment/detachment, changes MTU rate, updates routing table.
    • tests connections with pings, routes and iperf3 speeds.
  • 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'

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • CI/CD improvement

Testing

Describe the tests you ran and/or how to test these changes

  • Tests pass locally
  • Added new tests for the changes
  • Existing tests updated

Checklist

  • My code follows the project's code style
  • I have made corresponding changes to the documentation

Closes #

#69

- 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:
    - intakes plan from shard node in JSON form and applies it,
      validates it and optionally creates a new network service
      to persist interfaces across reboots.
    - handles virtual bridge creation/destruction, member iface
      attachment/detachment, changes MTU rate, updates routing
      table.
    - tests connections with pings, routes and iperf3 speeds.

- 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
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.

1 participant