public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH manager/network/proxmox{-ve-rs,-perl-rs} v7 00/21] Generate frr config using jinja templates and rust types
Date: Fri, 27 Mar 2026 11:06:58 +0100	[thread overview]
Message-ID: <7m5jfbpevrt4bwxw67v2wgjmqblxzoigk77uv43qwm7lvmahvz@aeblgd3r56xl> (raw)
In-Reply-To: <7564a8cf-58d3-41ff-926d-0485e9e6e02a@proxmox.com>

On 27.03.2026 02:11, Thomas Lamprecht wrote:
> Am 23.03.26 um 14:49 schrieb Gabriel Goller:
> > Previously we generated the frr config using one big perl hash, where every
> > controller-plugin and zone-plugin would push their stuff. This is not pretty
> > and also tricky to unite with our new rust-based fabrics. Furthermore the only
> > way to edit or override the frr config is currently the frr.conf.local file,
> > which is merged with the perl-hash in a very janky manner, which has sprouted
> > numerous forum threads. The main problem with the frr.conf.local is the limited
> > control which the user has as to where the override or additional config gets
> > placed. There are also a few config overrides or additions to frr.conf.local
> > that are currently impossible or generate invalid frr config.
> > 
> > To improve this we now ship templates, which we use to generate the frr config.
> > This is the way it is done in e.g. sonic and vyos. These jinja2 templates are
> > then populated using rust-structs. We changed the perl code to generate
> > bgp/evpn and isis config that can be deserialized by the rust types and then
> > rendered into a frr configuration using the templates.
> > 
> > # Versioning
> > 
> > The templates are in the proxmox-frr-templates debian package which, when
> > installed, copies the template into `/usr/share/proxmox-frr/templates`, where
> > they are read from using `include_str!`. This means the proxmox-frr-templates
> > package is only used for development and to version the templates. The user
> > only gets them in the binary of proxmox-frr (which, by extension, is in the
> > perl-rs shared library).
> > 
> > # frr.conf.local
> > 
> > The frr.conf.local merging code has been adjusted so that the frr.conf.local
> > still works as before.
> > 
> > This series requires:
> > https://lore.proxmox.com/pve-devel/20260323092140.42275-1-g.goller@proxmox.com/
> > 
> > Changelog:
> > 
> > v7 (thanks @Wolfgang, @Stefan):
> >   * ve-rs: remove `phf` dependency, use proxmox-sorted-macro and const array
> >     with binary_search lookup
> >   * ve-rs: add proxmox-frr unit-tests using vtysh dry-run to test them directly
> >     against the frr config parser (only if the vtysh binary exists)
> >   * ve-rs: use new from_str implementation of api_string_type! macro (requires:
> >     https://lore.proxmox.com/pve-devel/20260323092140.42275-1-g.goller@proxmox.com/)
> 
> Reads like a mature and well structured series, nice work!
> Some comments to specific patches, but most of it relatively benign (or at
> least easy to fix). With those addressed, if applicable, this would be IMO
> ready to be applied.
> 
> Please pick up Wolfgang R-b for a next submission, at least if you do not make
> bigger structural code changes. OTOH, I'd be open to squash in a few fixes and
> take this in after you checked the replies, just tell me what you favor; I'm
> also more then content with a v8 submission.

I'll send a v8 soon.




      reply	other threads:[~2026-03-27 10:06 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 13:48 Gabriel Goller
2026-03-23 13:48 ` [PATCH proxmox-ve-rs v7 01/21] ve-config: firewall: cargo fmt Gabriel Goller
2026-03-23 13:48 ` [PATCH proxmox-ve-rs v7 02/21] frr: add proxmox-frr-templates package that contains templates Gabriel Goller
2026-03-26 15:15   ` Shannon Sterz
2026-03-27  9:07     ` Gabriel Goller
2026-03-27  9:12       ` Gabriel Goller
2026-03-27 10:10         ` Thomas Lamprecht
2026-03-27 10:17           ` Gabriel Goller
2026-03-23 13:48 ` [PATCH proxmox-ve-rs v7 03/21] ve-config: remove FrrConfigBuilder struct Gabriel Goller
2026-03-23 13:48 ` [PATCH proxmox-ve-rs v7 04/21] sdn-types: support variable-length NET identifier Gabriel Goller
2026-03-26 15:15   ` Shannon Sterz
2026-03-27  9:25     ` Gabriel Goller
2026-03-23 13:48 ` [PATCH proxmox-ve-rs v7 05/21] frr: add template serializer and serialize fabrics using templates Gabriel Goller
2026-03-27  0:37   ` Thomas Lamprecht
2026-03-27  9:45     ` Gabriel Goller
2026-03-23 13:48 ` [PATCH proxmox-ve-rs v7 06/21] frr: add isis configuration and templates Gabriel Goller
2026-03-27  0:41   ` Thomas Lamprecht
2026-03-27  9:53     ` Gabriel Goller
2026-03-23 13:48 ` [PATCH proxmox-ve-rs v7 07/21] frr: support custom frr configuration lines Gabriel Goller
2026-03-23 13:48 ` [PATCH proxmox-ve-rs v7 08/21] frr: add bgp support with templates and serialization Gabriel Goller
2026-03-27  0:50   ` Thomas Lamprecht
2026-03-27 10:05     ` Gabriel Goller
2026-03-23 13:48 ` [PATCH proxmox-ve-rs v7 09/21] frr: enable minijinja strict undefined behavior mode Gabriel Goller
2026-03-23 13:49 ` [PATCH proxmox-ve-rs v7 10/21] frr: add vtysh integration tests for proxmox-frr Gabriel Goller
2026-03-24  9:03   ` Gabriel Goller
2026-03-23 13:49 ` [PATCH proxmox-perl-rs v7 11/21] sdn: add function to generate the frr config for all daemons Gabriel Goller
2026-03-23 13:49 ` [PATCH pve-network v7 12/21] tests: use Test::Differences to make test assertions Gabriel Goller
2026-03-23 13:49 ` [PATCH pve-network v7 13/21] test: add tests for frr.conf.local merging Gabriel Goller
2026-03-23 13:49 ` [PATCH pve-network v7 14/21] test: bgp: add some various integration tests Gabriel Goller
2026-03-23 13:49 ` [PATCH pve-network v7 15/21] sdn: write structured frr config that can be rendered using templates Gabriel Goller
2026-03-23 13:49 ` [PATCH pve-network v7 16/21] sdn: remove duplicate comment line '!' in frr config Gabriel Goller
2026-03-23 13:49 ` [PATCH pve-network v7 17/21] tests: rearrange some statements in the " Gabriel Goller
2026-03-23 13:49 ` [PATCH pve-network v7 18/21] sdn: adjust frr.conf.local merging to rust template types Gabriel Goller
2026-03-23 13:49 ` [PATCH pve-network v7 19/21] test: adjust frr_local_merge test for new template generation Gabriel Goller
2026-03-23 13:49 ` [PATCH pve-network v7 20/21] api: add dry-run endpoint for sdn apply to preview changes Gabriel Goller
2026-03-27  1:07   ` Thomas Lamprecht
2026-03-23 13:49 ` [PATCH pve-manager v7 21/21] sdn: add dry-run diff view for sdn apply Gabriel Goller
2026-03-26 13:40 ` [PATCH manager/network/proxmox{-ve-rs,-perl-rs} v7 00/21] Generate frr config using jinja templates and rust types Wolfgang Bumiller
2026-03-27  1:11 ` Thomas Lamprecht
2026-03-27 10:06   ` Gabriel Goller [this message]

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=7m5jfbpevrt4bwxw67v2wgjmqblxzoigk77uv43qwm7lvmahvz@aeblgd3r56xl \
    --to=g.goller@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal