From: Stefan Hanreich <s.hanreich@proxmox.com>
To: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>,
"Thomas Lamprecht" <t.lamprecht@proxmox.com>,
"Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
"Gabriel Goller" <g.goller@proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-access-control v2 1/1] permissions: add ACL paths for SDN fabrics
Date: Fri, 11 Apr 2025 18:51:49 +0200 [thread overview]
Message-ID: <f7d466bd-342a-4721-ab67-2b4bc5cf2d45@proxmox.com> (raw)
In-Reply-To: <19fab356-828b-4aa0-adc2-b35dd3bfafda@proxmox.com>
On 4/11/25 1:12 PM, Stefan Hanreich wrote:
> On 4/7/25 11:27, Fabian Grünbichler wrote:
>>
>>> Stefan Hanreich <s.hanreich@proxmox.com> hat am 07.04.2025 10:51 CEST geschrieben:
>>>
>>>
>>> On 4/7/25 10:12, Thomas Lamprecht wrote:
>>>> Am 07.04.25 um 09:24 schrieb Fabian Grünbichler:
>>>>> On April 4, 2025 7:20 pm, Thomas Lamprecht wrote:
>>>>>> So, without looking at the implementation, fabrics have the IDs unique
>>>>>> per sub-type? Could maybe also share an ID space, less confusion
>>>>>> potential, but naturally also less flexibility – what do you think?
>>>>>
>>>>> they share a section config (and thus ID-space), so I guess we could
>>>
>>> There's one section config file per fabric, so its ID is unique per
>>> protocol. We'd need to load *all* configuration files everytime we
>>> change one configuration file (at least when adding a fabric) so we can
>>> validate unique IDs across all fabric types.
>>
>> mea culpa, must have mixed that up with something else (probably the
>> controllers :-/). would it make sense to merge them given the similarities?
>
> Re-visiting this again, I took some time to write about the problem in
> greater detail and present some options. I'd really like to get the
> ball rolling on this discussion sooner than later, since otherwise
> it's hard to proceed with this patch series. This is a short overview
> for you to get a better idea, but it might make sense to discuss this
> in greater detail in person.
>
> Overview
> ========
>
> We have multiple types of fabrics:
> OpenFabric, OSPF and more in the future.
>
> We have the following hierarchy of models:
> Fabric -> Node -> Interface
>
> Some constraints for the models:
> * There can be more than one fabric of a given type
> * A fabric contains n nodes, a node contains n interfaces.
> * A node can be part of multiple fabrics, but one interface of a node
> can only be a part of one fabric.
> * Each of the three models has its own properties, that vary depending
> on the type of fabric
>
> Some fabric specific constraints can apply as well, for instance:
> * the IP prefixes of fabrics should not overlap
> * the IP of a node should be unique within a fabric
> * an OSPF interface can either have an IP or be unnumbered
> * OSPFv2 supports only v4, OpenFabric supports both
>
> Ideally, we'd like to validate all those constraints when modifying the
> configuration via the API or loading it.
>
>
> The key issues we ran into:
> * The type of a section can only be uniquely identified together with
> the protocol (e.g. ospf_node)
> * A node section can only be uniquely identified together with the id
> of the fabric that it belongs to (a node can occur in multiple
> fabrics)
> * 3 layers is one too much to cram into one section imo, so we have to
> at least split fabrics and nodes into two sections
> * parsing the type/id of a section into multiple fields is a bit
> clunky with the section-config implementation. Ideally we'd like to
> not have to do this separately at every site (rust, perl, frontend),
> but once when reading.
> * ideally, validation of *all* the constraints laid out above
>
>
> Solutions
> =========
>
> #1: Storing everything in one file
> ----------------------------------
>
> # fabrics.cfg
> <type>_(node|fabric): <fabricid>[_<nodeid>]
>
> + fixed amount of files
> + validation is simple
> + API/ACL paths are simple
> + related entities are in the same file
> - composite section types
> - composite section ids
> - complex API definitions
> - file can grow quite large
>
>
> #2: One file per fabric type (current solution)
> -----------------------------------------------
>
> # <type>.cfg
> fabric: <fabricid>
> node: <fabricid>_<nodeid>
>
> + simple section types
> + simple API definitions
> + related entities are in the same file
> - API/ACL paths are more complex
> - composite section ids
> - variable number of files
> - validation requires reading all files
>
>
> #3: One file per level in the hierarchy
> ---------------------------------------
>
> # fabric.cfg
> <type>: <fabricid>
>
> # node.cfg
> <type>: <fabricid>_<nodeid>
>
> + simple section types
> + fixed amount of files
> + API/ACL paths are simple
> - related entities are in different files
> - complex API definitions
> - composite section ids
> - validation requires reading both files
>
>
> #4: One file per fabric
> -----------------------
>
> # <fabricid>.cfg
> fabric: <fabricid>
> node: <nodeid>
>
> + simple types
> + simple ids
> + API/ACL paths are simple
> + related entities are in the same file
> - complex API definitions
> - variable number of files
> - information about type has to be encoded somewhere (directory?)
> - validation requires reading all files
>
>
> Imo, #2 and #3 seem like the contenders. #3 is what we use for zones /
> vnets / subnets, and it is . #2 makes API definitions a lot nicer,
> since we have exactly one schema per API endpoint, which also makes
> the generated API types in Rust a lot nicer. With #3 we currently
> generate two structs where basically every field is an Option<T>. The
> solution for this could be using oneOf across the whole API, but afaik
> that is not implemented in Schema2Rust currently. Alternatively, we
> could pop our own abstraction models on top of the generated types and
> convert from / to them when using the API in PDM, but the real
> solution is implementing oneOf support in Schema2Rust.
Reusing the models directly on the PDM side would of course render the
whole point wrt Schema2Rust moot.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-04-11 16:52 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-04 16:28 [pve-devel] [PATCH access-control/cluster/docs/gui-tests/manager/network/proxmox{, -ve-rs, -perl-rs} v2 00/57] Add SDN Fabrics Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox v2 1/1] serde: add string_as_bool module for boolean string parsing Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 01/15] sdn-types: initial commit Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 02/15] frr: create proxmox-frr crate Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 03/15] frr: add common frr types Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 04/15] frr: add openfabric types Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 05/15] frr: add ospf types Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 06/15] frr: add route-map types Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 07/15] frr: add generic types over openfabric and ospf Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 08/15] frr: add serializer for all FRR types Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 09/15] ve-config: add common section-config types for OpenFabric and OSPF Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 10/15] ve-config: add openfabric section-config Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 11/15] ve-config: add ospf section-config Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 12/15] ve-config: add FRR conversion helpers for openfabric and ospf Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 13/15] ve-config: add validation for section-config Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 14/15] ve-config: add section-config to frr types conversion Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-ve-rs v2 15/15] ve-config: add integrations tests Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-perl-rs v2 1/7] perl-rs: sdn: initial fabric infrastructure Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-perl-rs v2 2/7] perl-rs: sdn: add CRUD helpers for OpenFabric fabric management Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-perl-rs v2 3/7] perl-rs: sdn: OpenFabric perlmod methods Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-perl-rs v2 4/7] perl-rs: sdn: implement Openfabric interface file generation Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-perl-rs v2 5/7] perl-rs: sdn: add CRUD helpers for OSPF fabric management Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-perl-rs v2 6/7] perl-rs: sdn: OSPF perlmod methods Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH proxmox-perl-rs v2 7/7] perl-rs: sdn: implement OSPF interface file configuration generation Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-cluster v2 1/1] cluster: add sdn fabrics config files Gabriel Goller
2025-04-04 17:03 ` [pve-devel] applied: " Thomas Lamprecht
2025-04-04 16:28 ` [pve-devel] [PATCH pve-access-control v2 1/1] permissions: add ACL paths for SDN fabrics Gabriel Goller
2025-04-04 17:20 ` Thomas Lamprecht
2025-04-07 7:24 ` Fabian Grünbichler
2025-04-07 8:12 ` Thomas Lamprecht
2025-04-07 8:51 ` Stefan Hanreich
2025-04-07 9:27 ` Fabian Grünbichler
2025-04-07 9:44 ` Stefan Hanreich
2025-04-11 11:12 ` Stefan Hanreich
2025-04-11 11:14 ` Stefan Hanreich
2025-04-11 16:51 ` Stefan Hanreich [this message]
2025-04-07 9:34 ` Thomas Lamprecht
2025-04-07 10:08 ` Stefan Hanreich
2025-04-07 10:12 ` Thomas Lamprecht
2025-04-07 11:41 ` Gilberto Ferreira via pve-devel
[not found] ` <CAOKSTBsu8vrw8_nSu_LozwNwTc+ReTb6TEg3K_iM8uYh9oRRFg@mail.gmail.com>
2025-04-07 11:59 ` Stefan Hanreich
2025-04-07 12:22 ` Gilberto Ferreira via pve-devel
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 01/19] sdn: fix value returned by pending_config Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 02/19] debian: add dependency to proxmox-perl-rs Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 03/19] fabrics: add fabrics module Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 04/19] refactor: controller: move frr methods into helper Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 05/19] frr: add new helpers for reloading frr configuration Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 06/19] controllers: implement new api for frr config generation Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 07/19] sdn: add frr config generation helper Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 08/19] test: isis: add test for standalone configuration Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 09/19] sdn: frr: add daemon status to frr helper Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 10/19] sdn: commit fabrics config to running configuration Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 11/19] fabrics: generate ifupdown configuration Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 12/19] api: fabrics: add common helpers Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 13/19] api: openfabric: add api endpoints Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 14/19] api: openfabric: add node endpoints Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 15/19] api: ospf: add fabric endpoints Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 16/19] api: ospf: add node endpoints Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 17/19] api: fabrics: add module / subfolder Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 18/19] test: fabrics: add test cases for ospf and openfabric + evpn Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-network v2 19/19] frr: bump frr config version to 10.2.1 Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-manager v2 01/11] api: use new generalized frr and etc network config helper functions Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-manager v2 02/11] fabric: add common interface panel Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-manager v2 03/11] fabric: add OpenFabric interface properties Gabriel Goller
2025-04-04 16:28 ` [pve-devel] [PATCH pve-manager v2 04/11] fabric: add OSPF " Gabriel Goller
2025-04-04 16:29 ` [pve-devel] [PATCH pve-manager v2 05/11] fabric: add generic node edit panel Gabriel Goller
2025-04-04 16:29 ` [pve-devel] [PATCH pve-manager v2 06/11] fabric: add generic fabric " Gabriel Goller
2025-04-04 16:29 ` [pve-devel] [PATCH pve-manager v2 07/11] fabric: add OpenFabric " Gabriel Goller
2025-04-04 16:29 ` [pve-devel] [PATCH pve-manager v2 08/11] fabric: add OSPF " Gabriel Goller
2025-04-04 16:29 ` [pve-devel] [PATCH pve-manager v2 09/11] fabrics: Add main FabricView Gabriel Goller
2025-04-04 16:29 ` [pve-devel] [PATCH pve-manager v2 10/11] utils: avoid line-break in pending changes message Gabriel Goller
2025-04-04 16:29 ` [pve-devel] [PATCH pve-manager v2 11/11] ui: permissions: add ACL paths for fabrics Gabriel Goller
2025-04-04 16:29 ` [pve-devel] [PATCH pve-gui-tests v2 1/1] pve: add sdn/fabrics screenshots Gabriel Goller
2025-04-04 16:29 ` [pve-devel] [PATCH pve-docs v2 1/1] fabrics: add initial documentation for sdn fabrics Gabriel Goller
2025-04-07 8:53 ` [pve-devel] [PATCH access-control/cluster/docs/gui-tests/manager/network/proxmox{, -ve-rs, -perl-rs} v2 00/57] Add SDN Fabrics Friedrich Weber
2025-04-07 9:39 ` Stefan Hanreich
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=f7d466bd-342a-4721-ab67-2b4bc5cf2d45@proxmox.com \
--to=s.hanreich@proxmox.com \
--cc=f.gruenbichler@proxmox.com \
--cc=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