From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 3332F1FF16E for <inbox@lore.proxmox.com>; Mon, 3 Mar 2025 17:59:13 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E328210001; Mon, 3 Mar 2025 17:59:07 +0100 (CET) Message-ID: <7c2bdaba-e510-4480-909c-3961561abf7c@proxmox.com> Date: Mon, 3 Mar 2025 17:58:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>, Gabriel Goller <g.goller@proxmox.com> References: <20250214133951.344500-1-g.goller@proxmox.com> Content-Language: en-US From: Stefan Hanreich <s.hanreich@proxmox.com> In-Reply-To: <20250214133951.344500-1-g.goller@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.674 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [RFC cluster/manager/network/proxmox{-ve-rs, -perl-rs} 00/11] Add SDN Fabrics X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> Could you please rebase this (patch 3 in particular doesn't apply) and make sure everything builds debian packages properly (in ve-rs via build.sh)? I'll continue tomorrow with the review! On 2/14/25 14:39, Gabriel Goller wrote: > This series allows the user to add fabrics such as OpenFabric and OSPF over > their clusters. > > Note that this is a very early RFC and its sole purpose is to get some initial > feedback and architectural suggestions. > > Overview > -------- > Add a new section to the sdn panel in the datacenter options which allows > creating OpenFabric and OSPF fabrics. One can add Nodes to the fabrics by > selecting them from a dropdown which shows all the nodes in the cluster. > Additionally the user can then select the interfaces of the node which should > be added to the fabric. There are also protocol-specific options such as "passive", > "hello-interval" etc. available to select on the interface. > > Implementation > -------------- > Add config files for every fabric type, so currently we add sdn/ospf.cfg and > sdn/openfabric.cfg. These config file get read by pve-network and the raw > section config gets passed to rust (proxmox-perl-rs), where we parse it using > helpers and schemas from proxmox-ve-config crate (proxmox-ve-rs repo). The > config parsed from the section-config is then converted into a better > representation (no PropertyString, embed Nodes into Fabrics, etc.), which is > also guaranteed to be correct (everything is typed and the values are > semantically checked). This intermediate representation can then be converted > into a `FrrConfig`, which lives in the proxmox-frr crate (proxmox-ve-rs repo). > This representation is very close to the real frr config (eg contains routers, > interfaces, etc.) and can either be converted to a `PerlFrr` config (which will > be used by pve-network to merge with the existin config) or (optional and > experimental) into a string, which would be the actual frr config as it can be > found in `frr.conf`. > > This series also relies on: > https://lore.proxmox.com/pve-devel/20250205161340.740740-1-g.goller@proxmox.com/ > > Open Questions/Issues: > * generate openfabric net from the selected interface ip (the net is quite > hard to get right otherwise). > * Reminder to apply configuration -> Probably add a "state" column which shows > "new" (when not applied) like in the sdn/controllers grid. > * Add ability for the user to create a "standard" setup, where he can select a > node and we automatically add an ip address to the loopback address and add > the loopback interface as passive to the openfabric/ospf fabric. (Maybe we > are able to get frr to support dummy interfaces in the meantime, which would > be even better.) > * Check if we want continue using the pve-network perl frr merging code or if > we want to transition to rust -> vtysh. So the config gets flushed to the > daemon directly using vtysh, this allows the user to change the frr config > manually and their settings not getting overwritten by us (we also avoid > reloading the daemon). > * Write some extensive documentation on what the Fabrics can/cannot do. > > proxmox-ve-rs: > > Gabriel Goller (3): > add crate with common network types > add proxmox-frr crate with frr types > add intermediate fabric representation > > Cargo.toml | 7 + > proxmox-frr/Cargo.toml | 25 + > proxmox-frr/src/common.rs | 54 ++ > proxmox-frr/src/lib.rs | 223 ++++++++ > proxmox-frr/src/openfabric.rs | 137 +++++ > proxmox-frr/src/ospf.rs | 148 ++++++ > proxmox-network-types/Cargo.toml | 15 + > proxmox-network-types/src/lib.rs | 1 + > proxmox-network-types/src/net.rs | 239 +++++++++ > proxmox-ve-config/Cargo.toml | 10 +- > proxmox-ve-config/debian/control | 4 +- > proxmox-ve-config/src/sdn/fabric/common.rs | 90 ++++ > proxmox-ve-config/src/sdn/fabric/mod.rs | 68 +++ > .../src/sdn/fabric/openfabric.rs | 494 ++++++++++++++++++ > proxmox-ve-config/src/sdn/fabric/ospf.rs | 375 +++++++++++++ > proxmox-ve-config/src/sdn/mod.rs | 1 + > 16 files changed, 1885 insertions(+), 6 deletions(-) > create mode 100644 proxmox-frr/Cargo.toml > create mode 100644 proxmox-frr/src/common.rs > create mode 100644 proxmox-frr/src/lib.rs > create mode 100644 proxmox-frr/src/openfabric.rs > create mode 100644 proxmox-frr/src/ospf.rs > create mode 100644 proxmox-network-types/Cargo.toml > create mode 100644 proxmox-network-types/src/lib.rs > create mode 100644 proxmox-network-types/src/net.rs > create mode 100644 proxmox-ve-config/src/sdn/fabric/common.rs > create mode 100644 proxmox-ve-config/src/sdn/fabric/mod.rs > create mode 100644 proxmox-ve-config/src/sdn/fabric/openfabric.rs > create mode 100644 proxmox-ve-config/src/sdn/fabric/ospf.rs > > > proxmox-perl-rs: > > Gabriel Goller (1): > fabrics: add CRUD and generate fabrics methods > > pve-rs/Cargo.toml | 5 +- > pve-rs/Makefile | 3 + > pve-rs/src/lib.rs | 1 + > pve-rs/src/sdn/fabrics.rs | 202 ++++++++++++++++ > pve-rs/src/sdn/mod.rs | 3 + > pve-rs/src/sdn/openfabric.rs | 454 +++++++++++++++++++++++++++++++++++ > pve-rs/src/sdn/ospf.rs | 425 ++++++++++++++++++++++++++++++++ > 7 files changed, 1092 insertions(+), 1 deletion(-) > create mode 100644 pve-rs/src/sdn/fabrics.rs > create mode 100644 pve-rs/src/sdn/mod.rs > create mode 100644 pve-rs/src/sdn/openfabric.rs > create mode 100644 pve-rs/src/sdn/ospf.rs > > > pve-cluster: > > Gabriel Goller (1): > cluster: add sdn fabrics config files > > src/PVE/Cluster.pm | 2 ++ > 1 file changed, 2 insertions(+) > > > pve-network: > > Gabriel Goller (3): > add config file and common read/write methods > merge the frr config with the fabrics frr config on apply > add api endpoints for fabrics > > src/PVE/API2/Network/SDN.pm | 7 + > src/PVE/API2/Network/SDN/Fabrics.pm | 57 +++ > src/PVE/API2/Network/SDN/Fabrics/Common.pm | 111 +++++ > src/PVE/API2/Network/SDN/Fabrics/Makefile | 9 + > .../API2/Network/SDN/Fabrics/OpenFabric.pm | 460 ++++++++++++++++++ > src/PVE/API2/Network/SDN/Fabrics/Ospf.pm | 433 +++++++++++++++++ > src/PVE/API2/Network/SDN/Makefile | 3 +- > src/PVE/Network/SDN.pm | 8 +- > src/PVE/Network/SDN/Controllers.pm | 1 - > src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 3 - > src/PVE/Network/SDN/Controllers/Frr.pm | 13 + > src/PVE/Network/SDN/Fabrics.pm | 86 ++++ > src/PVE/Network/SDN/Makefile | 2 +- > 13 files changed, 1186 insertions(+), 7 deletions(-) > create mode 100644 src/PVE/API2/Network/SDN/Fabrics.pm > create mode 100644 src/PVE/API2/Network/SDN/Fabrics/Common.pm > create mode 100644 src/PVE/API2/Network/SDN/Fabrics/Makefile > create mode 100644 src/PVE/API2/Network/SDN/Fabrics/OpenFabric.pm > create mode 100644 src/PVE/API2/Network/SDN/Fabrics/Ospf.pm > create mode 100644 src/PVE/Network/SDN/Fabrics.pm > > > pve-manager: > > Gabriel Goller (3): > sdn: add Fabrics view > sdn: add fabric edit/delete forms > network: return loopback interface on network endpoint > > PVE/API2/Cluster.pm | 7 +- > PVE/API2/Network.pm | 9 +- > www/manager6/.lint-incremental | 0 > www/manager6/Makefile | 8 + > www/manager6/dc/Config.js | 8 + > www/manager6/sdn/FabricsView.js | 359 ++++++++++++++++++ > www/manager6/sdn/fabrics/Common.js | 222 +++++++++++ > .../sdn/fabrics/openfabric/FabricEdit.js | 67 ++++ > .../sdn/fabrics/openfabric/InterfaceEdit.js | 92 +++++ > .../sdn/fabrics/openfabric/NodeEdit.js | 187 +++++++++ > www/manager6/sdn/fabrics/ospf/FabricEdit.js | 60 +++ > .../sdn/fabrics/ospf/InterfaceEdit.js | 46 +++ > www/manager6/sdn/fabrics/ospf/NodeEdit.js | 191 ++++++++++ > 13 files changed, 1244 insertions(+), 12 deletions(-) > create mode 100644 www/manager6/.lint-incremental > create mode 100644 www/manager6/sdn/FabricsView.js > create mode 100644 www/manager6/sdn/fabrics/Common.js > create mode 100644 www/manager6/sdn/fabrics/openfabric/FabricEdit.js > create mode 100644 www/manager6/sdn/fabrics/openfabric/InterfaceEdit.js > create mode 100644 www/manager6/sdn/fabrics/openfabric/NodeEdit.js > create mode 100644 www/manager6/sdn/fabrics/ospf/FabricEdit.js > create mode 100644 www/manager6/sdn/fabrics/ospf/InterfaceEdit.js > create mode 100644 www/manager6/sdn/fabrics/ospf/NodeEdit.js > > > Summary over all repositories: > 50 files changed, 5409 insertions(+), 26 deletions(-) > _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel