From: Hannes Laimer <h.laimer@proxmox.com>
To: Stefan Hanreich <s.hanreich@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-perl-rs v4 3/7] sdn: fabrics: add BGP status endpoints
Date: Wed, 13 May 2026 15:02:20 +0200 [thread overview]
Message-ID: <f280d7a3-397e-424c-a7b0-c67234b16277@proxmox.com> (raw)
In-Reply-To: <03e0b16c-79df-44cc-bf18-bf2e89c4982d@proxmox.com>
On 2026-05-13 14:33, Stefan Hanreich wrote:
> On 5/12/26 4:12 PM, Hannes Laimer wrote:
>> Expose BGP fabric status through the existing fabric status API.
>> Routes are fetched for both IPv4 and IPv6, and neighbor/interface
>> state is derived from BGP session info.
>>
>> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
>> ---
>> pve-rs/src/bindings/sdn/fabrics.rs | 97 +++++++++++++++++++++++++-
>> pve-rs/src/sdn/status.rs | 106 ++++++++++++++++++++++++++++-
>> 2 files changed, 198 insertions(+), 5 deletions(-)
>>
>> diff --git a/pve-rs/src/bindings/sdn/fabrics.rs b/pve-rs/src/bindings/sdn/fabrics.rs
>> index f914094..0189ecd 100644
>> --- a/pve-rs/src/bindings/sdn/fabrics.rs
>> +++ b/pve-rs/src/bindings/sdn/fabrics.rs
>> @@ -12,8 +12,8 @@ pub mod pve_rs_sdn_fabrics {
>> use std::process::Command;
>> use std::sync::Mutex;
>>
>> - use anyhow::{Context, Error, format_err};
>> - use openssl::hash::{MessageDigest, hash};
>> + use anyhow::{format_err, Context, Error};
>> + use openssl::hash::{hash, MessageDigest};
>> use proxmox_ve_config::sdn::fabric::section_config::node::api::{Node, NodeUpdater};
>> use serde::{Deserialize, Serialize};
>>
>> @@ -31,8 +31,8 @@ pub mod pve_rs_sdn_fabrics {
>> };
>> use proxmox_ve_config::sdn::fabric::section_config::interface::InterfaceName;
>> use proxmox_ve_config::sdn::fabric::section_config::node::{Node as ConfigNode, NodeId};
>> - use proxmox_ve_config::sdn::fabric::section_config::Section;
>> use proxmox_ve_config::sdn::fabric::section_config::protocol::bgp::BgpNode;
>> + use proxmox_ve_config::sdn::fabric::section_config::Section;
>> use proxmox_ve_config::sdn::fabric::{FabricConfig, FabricEntry};
>> use proxmox_ve_config::sdn::wireguard::WireGuardConfigBuilder;
>>
>> @@ -840,6 +840,35 @@ pub mod pve_rs_sdn_fabrics {
>> status::get_routes(fabric_id, config, ospf_routes, proxmox_sys::nodename())
>> }
>> FabricEntry::WireGuard(_) => Ok(Vec::new()),
>> + FabricEntry::Bgp(_) => {
>> + let bgp_ipv4_routes_string = String::from_utf8(
>> + Command::new("sh")
>> + .args(["-c", "vtysh -c 'show ip route bgp json'"])
>> + .output()?
>> + .stdout,
>> + )?;
>> +
>> + let bgp_ipv6_routes_string = String::from_utf8(
>> + Command::new("sh")
>> + .args(["-c", "vtysh -c 'show ipv6 route bgp json'"])
>> + .output()?
>> + .stdout,
>> + )?;
>
> pre-existing but something that really irks me is that we pollute the
> vtysh history with our pvestatd invocations. It's possible to set
> VTYSH_HISTFILE=/dev/null to avoid writing the commands to history - so
> we could do that here for all vtysh invocations?
>
could also do as a follow-up that does this for all, but can also
include in v5 for bgp fabric. fine with me either way
> I can prepare a patch for OSPF / Openfabric.
>
next prev parent reply other threads:[~2026-05-13 13:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 14:12 [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v4 0/7] sdn: add BGP fabric Hannes Laimer
2026-05-12 14:12 ` [PATCH proxmox-ve-rs v4 1/7] sdn: fabric: add BGP protocol support Hannes Laimer
2026-05-13 12:29 ` Stefan Hanreich
2026-05-13 13:00 ` Hannes Laimer
2026-05-12 14:13 ` [PATCH proxmox-perl-rs v4 2/7] sdn: fabrics: add BGP config generation Hannes Laimer
2026-05-12 14:13 ` [PATCH proxmox-perl-rs v4 3/7] sdn: fabrics: add BGP status endpoints Hannes Laimer
2026-05-13 12:33 ` Stefan Hanreich
2026-05-13 13:02 ` Hannes Laimer [this message]
2026-05-12 14:13 ` [PATCH pve-network v4 4/7] sdn: fabrics: register bgp as a fabric protocol type Hannes Laimer
2026-05-12 14:13 ` [PATCH pve-network v4 5/7] test: evpn: add integration test for EVPN over BGP fabric Hannes Laimer
2026-05-12 14:13 ` [PATCH pve-manager v4 6/7] ui: sdn: add BGP fabric support Hannes Laimer
2026-05-13 12:38 ` Stefan Hanreich
2026-05-12 14:13 ` [PATCH pve-docs v4 7/7] sdn: add bgp fabric section Hannes Laimer
2026-05-13 12:39 ` [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v4 0/7] sdn: add BGP fabric Stefan Hanreich
2026-05-13 18:43 ` superseded: " Hannes Laimer
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=f280d7a3-397e-424c-a7b0-c67234b16277@proxmox.com \
--to=h.laimer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=s.hanreich@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