From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 3146F1FF0DE for ; Thu, 19 Nov 2026 14:30:25 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 8C1DF21676; Thu, 19 Nov 2026 14:30:23 +0100 (CET) Date: Thu, 19 Nov 2026 14:30:17 +0100 From: Gabriel Goller To: Stefan Hanreich Subject: Re: [PATCH proxmox-perl-rs v3 10/32] pve-rs: fabrics: make per-fabric status queries VRF-aware Message-ID: References: <20261116161154.343743-1-g.goller@proxmox.com> <20261116161154.343743-11-g.goller@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20260616 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795095018286 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.232 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: JU6XCMKURB7IKUPEXY6USM7GNNLAX4TD X-Message-ID-Hash: JU6XCMKURB7IKUPEXY6USM7GNNLAX4TD X-MailFrom: g.goller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 18.11.2026 16:42, Stefan Hanreich wrote: > > On 11/16/26 5:13 PM, Gabriel Goller wrote: > > Use the fabric VRF in FRR route, neighbor, and interface queries for > > OSPF and BGP. > > > > Keep the existing commands for fabrics in the default routing table. > > > > Signed-off-by: Gabriel Goller > > --- > > pve-rs/src/bindings/sdn/fabrics.rs | 63 +++++++++++++++++++----------- > > 1 file changed, 41 insertions(+), 22 deletions(-) > > > > diff --git a/pve-rs/src/bindings/sdn/fabrics.rs b/pve-rs/src/bindings/sdn/fabrics.rs > > index b7c2d91e5471..381de692acfc 100644 > > --- a/pve-rs/src/bindings/sdn/fabrics.rs > > +++ b/pve-rs/src/bindings/sdn/fabrics.rs > > @@ -841,6 +841,7 @@ pub mod pve_rs_sdn_fabrics { > > }; > > > > let fabric = config.get_fabric(&fabric_id)?; > > + let vrf = fabric.fabric_vrf_name(); > > match fabric { > > FabricEntry::Openfabric(_) => { > > let openfabric_ipv4_routes_string = String::from_utf8( > > @@ -878,12 +879,12 @@ pub mod pve_rs_sdn_fabrics { > > ) > > } > > FabricEntry::Ospf(_) => { > > - let ospf_routes_string = String::from_utf8( > > - Command::new("sh") > > - .args(["-c", "vtysh -c 'show ip route ospf json'"]) > > - .output()? > > - .stdout, > > - )?; > > + let command = match &vrf { > > + Some(vrf) => format!("vtysh -c 'show ip route vrf {vrf} ospf json'"), > > not a pressing issue as it inserts the zone name, but we really shouldn't interpolate this into > a string here, it's easily avoidable. Right, pulled it out in a helper. Removed the invocation through `sh -c` and added the HIST_FILE override. > > + None => "vtysh -c 'show ip route ospf json'".to_string(), > > + }; > > + let ospf_routes_string = > > + String::from_utf8(Command::new("sh").args(["-c", &command]).output()?.stdout)?; > > let ospf_routes: proxmox_frr::de::Routes = if ospf_routes_string.is_empty() { > > proxmox_frr::de::Routes::default() > > } else { Fixed all the other invocations as well. Thanks for the review!