From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager 2/4] proxmox-network-interface-pinning: add fabrics support
Date: Thu, 17 Jul 2025 17:28:39 +0200 [thread overview]
Message-ID: <20250717152841.397830-5-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250717152841.397830-1-s.hanreich@proxmox.com>
The fabric configuration references interfaces of nodes, which need to
be updated when pinning network interface names as well. Use the new
helper provided by perlmod for that.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
PVE/CLI/proxmox_network_interface_pinning.pm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/PVE/CLI/proxmox_network_interface_pinning.pm b/PVE/CLI/proxmox_network_interface_pinning.pm
index ea98ccb5e..b4c25154a 100644
--- a/PVE/CLI/proxmox_network_interface_pinning.pm
+++ b/PVE/CLI/proxmox_network_interface_pinning.pm
@@ -11,6 +11,7 @@ use PVE::INotify;
use PVE::Network;
use PVE::Network::SDN;
use PVE::Network::SDN::Controllers;
+use PVE::Network::SDN::Fabrics;
use PVE::RPCEnvironment;
use PVE::SectionConfig;
use PVE::Tools;
@@ -24,6 +25,22 @@ sub setup_environment {
PVE::RPCEnvironment->setup_default_cli_env();
}
+my sub update_sdn_fabrics {
+ my ($mapping) = @_;
+
+ print "Updating /etc/pve/sdn/fabrics.cfg\n";
+
+ my $code = sub {
+ my $local_node = PVE::INotify::nodename();
+
+ my $config = PVE::Network::SDN::Fabrics::config();
+ $config->map_interfaces($local_node, $mapping);
+ PVE::Network::SDN::Fabrics::write_config($config);
+ };
+
+ PVE::Network::SDN::lock_sdn_config($code);
+}
+
my sub update_sdn_controllers {
my ($mapping) = @_;
@@ -390,6 +407,7 @@ __PACKAGE__->register_method({
update_host_fw_config($mapping);
update_etc_network_interfaces($mapping, $existing_pins);
update_sdn_controllers($mapping);
+ update_sdn_fabrics($mapping);
print "Successfully updated Proxmox VE configuration files.\n";
print "\nPlease reboot to apply the changes to your configuration\n\n";
--
2.39.5
_______________________________________________
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-07-17 15:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 15:28 [pve-devel] [PATCH manager/proxmox{-ve-rs, -perl-rs} 0/6] proxmox-network-interface-pinning fixes Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH proxmox-ve-rs 1/1] ve-config: fabrics: add helpers for proxmox-network-interface-pinning Stefan Hanreich
2025-07-17 19:27 ` [pve-devel] applied: " Thomas Lamprecht
2025-07-17 15:28 ` [pve-devel] [PATCH proxmox-perl-rs 1/1] pve-rs: fabrics: helper for mapping interface names Stefan Hanreich
2025-07-17 19:00 ` [pve-devel] applied: " Thomas Lamprecht
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 1/4] pve-sdn-commit: fix reloading logic Stefan Hanreich
2025-07-17 19:27 ` [pve-devel] applied-series: " Thomas Lamprecht
2025-07-17 15:28 ` Stefan Hanreich [this message]
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 3/4] proxmox-network-interface-pinning: die on failing to write interfaces Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 4/4] proxmox-network-interface-pinning: fix pinning after reboot 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=20250717152841.397830-5-s.hanreich@proxmox.com \
--to=s.hanreich@proxmox.com \
--cc=pve-devel@lists.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 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.