* [pve-devel] [PATCH proxmox-ve-rs] ve-config: avoid panicing if fabric node id does not match expected pattern
@ 2026-01-16 10:07 Hannes Laimer
2026-01-16 11:28 ` Gabriel Goller
2026-05-06 10:13 ` applied: " Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Hannes Laimer @ 2026-01-16 10:07 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
randomly ran into this, usually we generate this config, but technically
manually editing it is possible. so we should not panic
proxmox-ve-config/src/sdn/fabric/section_config/node.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/proxmox-ve-config/src/sdn/fabric/section_config/node.rs b/proxmox-ve-config/src/sdn/fabric/section_config/node.rs
index 17d2f0b..e6d41d9 100644
--- a/proxmox-ve-config/src/sdn/fabric/section_config/node.rs
+++ b/proxmox-ve-config/src/sdn/fabric/section_config/node.rs
@@ -79,7 +79,9 @@ impl std::str::FromStr for NodeSectionId {
type Err = anyhow::Error;
fn from_str(value: &str) -> Result<Self, Self::Err> {
- let (fabric_id, node_id) = value.split_once("_").unwrap();
+ let (fabric_id, node_id) = value
+ .split_once("_")
+ .ok_or_else(|| anyhow::anyhow!("node id must be <fabric>_<node>"))?;
Ok(Self {
fabric_id: FabricId::from_string(fabric_id.to_string())?,
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH proxmox-ve-rs] ve-config: avoid panicing if fabric node id does not match expected pattern
2026-01-16 10:07 [pve-devel] [PATCH proxmox-ve-rs] ve-config: avoid panicing if fabric node id does not match expected pattern Hannes Laimer
@ 2026-01-16 11:28 ` Gabriel Goller
2026-05-06 10:13 ` applied: " Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Gabriel Goller @ 2026-01-16 11:28 UTC (permalink / raw)
To: Hannes Laimer; +Cc: pve-devel
LGTM
Reviewed-by: Gabriel Goller <g.goller@proxmox.com>
On 16.01.2026 11:07, Hannes Laimer wrote:
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> randomly ran into this, usually we generate this config, but technically
> manually editing it is possible. so we should not panic
>
> proxmox-ve-config/src/sdn/fabric/section_config/node.rs | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/proxmox-ve-config/src/sdn/fabric/section_config/node.rs b/proxmox-ve-config/src/sdn/fabric/section_config/node.rs
> index 17d2f0b..e6d41d9 100644
> --- a/proxmox-ve-config/src/sdn/fabric/section_config/node.rs
> +++ b/proxmox-ve-config/src/sdn/fabric/section_config/node.rs
> @@ -79,7 +79,9 @@ impl std::str::FromStr for NodeSectionId {
> type Err = anyhow::Error;
>
> fn from_str(value: &str) -> Result<Self, Self::Err> {
> - let (fabric_id, node_id) = value.split_once("_").unwrap();
> + let (fabric_id, node_id) = value
> + .split_once("_")
> + .ok_or_else(|| anyhow::anyhow!("node id must be <fabric>_<node>"))?;
>
> Ok(Self {
> fabric_id: FabricId::from_string(fabric_id.to_string())?,
> --
> 2.47.3
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* applied: [pve-devel] [PATCH proxmox-ve-rs] ve-config: avoid panicing if fabric node id does not match expected pattern
2026-01-16 10:07 [pve-devel] [PATCH proxmox-ve-rs] ve-config: avoid panicing if fabric node id does not match expected pattern Hannes Laimer
2026-01-16 11:28 ` Gabriel Goller
@ 2026-05-06 10:13 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2026-05-06 10:13 UTC (permalink / raw)
To: pve-devel, Hannes Laimer
On Fri, 16 Jan 2026 11:07:31 +0100, Hannes Laimer wrote:
>
Applied, thanks!
[1/1] ve-config: avoid panicing if fabric node id does not match expected pattern
commit: 07b527c2ace4d5ed30dcd239ada3eabcae843211
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-06 10:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-16 10:07 [pve-devel] [PATCH proxmox-ve-rs] ve-config: avoid panicing if fabric node id does not match expected pattern Hannes Laimer
2026-01-16 11:28 ` Gabriel Goller
2026-05-06 10:13 ` applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.