From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [RFC network 0/2] sdn: frr: add append-only custom user config
Date: Wed, 1 Jul 2026 12:30:43 +0200 [thread overview]
Message-ID: <20260701103051.119422-1-g.goller@proxmox.com> (raw)
This RFC adds an append-only mechanism for custom FRR configuration via
/etc/frr/frr.conf.d/*.conf.
Users sometimes need FRR configuration that SDN does not model yet. Editing
/etc/frr/frr.conf directly is not useful because it is generated, while
frr.conf.local is parsed and merged into the generated config, which can fail
for unsupported constructs.
The proposed approach copies snippets from /etc/frr/frr.conf.d/*.conf in sorted
filename order after the fully generated SDN FRR config, including Rust-generated
fabric config, and before the final line vty stanza. The snippets are copied as
raw config without parsing or modifying their content.
Each appended snippet is wrapped in marker comments in the installed config.
Those markers are also checked in the active /etc/frr/frr.conf so that removing
the last snippet, or the whole frr.conf.d directory, still triggers an FRR
rewrite and cleans up stale appended config. (This is not the case right now
with the frr.conf.local file, but we can't change this because that would be
breaking.)
Before replacing /etc/frr/frr.conf, the full candidate config is validated with
vtysh -C -f. On validation failure, the reload fails and shows the error. We
need this because previously with the frr.conf.local the merging code provided
some sort of syntax-checking and simply didn't merge code that did not match
the syntax.
Open questions for the RFC:
* Is append-only custom config the right user-facing model? Do we want to go all
out with the user-editable templates?
* Is this possible/should we do this completely in rust? (perl-rs)
* Is /etc/frr/frr.conf.d/*.conf the right path and naming scheme?
* Is checking installed marker comments the right cleanup trigger?
pve-network:
Gabriel Goller (2):
sdn: frr: add append-only custom frr config
tests: cover FRR append config files
src/PVE/Network/SDN.pm | 26 +++-
src/PVE/Network/SDN/Frr.pm | 115 ++++++++++++++++--
src/test/run_test_zones.pl | 53 ++++++++
.../expected_controller_config | 4 +
.../evpn/auto_mode/expected_controller_config | 4 +
.../evpn/bgp_ebgp/expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../bgp_fabric/expected_controller_config | 4 +
.../bgp_loopback/expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../evpn/ebgp/expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../ebgp_loopback/expected_controller_config | 4 +
.../evpn/ebgp_only/expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../evpn/exitnode/expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../exitnode_snat/expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../evpn/ipv4/expected_controller_config | 10 ++
.../zones/evpn/ipv4/frr.conf.d/00-empty.conf | 0
.../zones/evpn/ipv4/frr.conf.d/10-custom.conf | 1 +
.../evpn/ipv4ipv6/expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../evpn/ipv6/expected_controller_config | 4 +
.../ipv6underlay/expected_controller_config | 4 +
.../evpn/isis/expected_controller_config | 4 +
.../isis_loopback/expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../multiplezones/expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../ospf_fabric/expected_controller_config | 4 +
.../evpn/routemap/expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../expected_controller_config | 4 +
.../evpn/rt_import/expected_controller_config | 4 +
.../evpn/vxlanport/expected_controller_config | 4 +
51 files changed, 374 insertions(+), 11 deletions(-)
create mode 100644 src/test/zones/evpn/ipv4/frr.conf.d/00-empty.conf
create mode 100644 src/test/zones/evpn/ipv4/frr.conf.d/10-custom.conf
Summary over all repositories:
51 files changed, 374 insertions(+), 11 deletions(-)
--
Generated by murpp 0.11.0
next reply other threads:[~2026-07-01 10:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 10:30 Gabriel Goller [this message]
2026-07-01 10:30 ` [PATCH pve-network 1/2] sdn: frr: add append-only custom frr config Gabriel Goller
2026-07-01 10:30 ` [PATCH pve-network 2/2] tests: cover FRR append config files Gabriel Goller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260701103051.119422-1-g.goller@proxmox.com \
--to=g.goller@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox