HomeDevCentral

Refactor routes configuration

Description

Refactor routes configuration

Summary:
Until now, routes configuration was provided only for FreeBSD,
but nothing for Linux machines.

This change reads route from two sources:

  • the new nodes' network data structure, for default gateway
  • the networks pillar for private networks

For FreeBSD, a consolidated /etc/rc.conf.d/managed replaces
former ipv4 file.

On CentOS and Debian, there is some traction to switch to Network Manager
to configure the network even on servers. There is a NMState library
with a configuration in YAML format suitable for our needs, but dependencies
are really heavy to store this. And it only supports Network Manager,
not used on CentOS machines.

The solution selected for Linux systems is to provision a /etc/routes.conf
with all the routes definition and a routes utility to apply them. Zero
dependency in addition to iproutes. A systemd unit runs it during startup.

Acknowledgment: thanks to @semarie, Natacha (@faelys) and @alarig
for feedback about how to read routes.conf and discard comments.

Test Plan: Deploy on router-001, Ysul and Dwellers

Reviewers: dereckson

Reviewed By: dereckson

Differential Revision: https://devcentral.nasqueron.org/D2595

Details

Provenance
derecksonAuthored on Mar 21 2022, 22:01
derecksonPushed on Mar 21 2022, 22:12
Reviewer
dereckson
Differential Revision
D2595: Refactor routes configuration
Parents
rOPS619abc4ada52: Ensure /etc/rc.local to be executable
Branches
Unknown
Tags
Unknown