* [pve-devel] [PATCH manager 0/3] backport 'proxmox-network-interface-pinning fixes'
@ 2025-07-17 15:28 Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 1/3] proxmox-network-interface-pinning: die on failing to write interfaces Stefan Hanreich
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-07-17 15:28 UTC (permalink / raw)
To: pve-devel
Contains the changes from the original series minus the changes made because of
the SDN fabrics. For more details see the respective commits / original series.
pve-manager:
Stefan Hanreich (3):
proxmox-network-interface-pinning: die on failing to write interfaces
proxmox-network-interface-pinning: fix pinning after reboot
pve-sdn-commit: add ifreload
PVE/CLI/proxmox_network_interface_pinning.pm | 4 +++-
bin/pve-sdn-commit | 11 +++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
Summary over all repositories:
2 files changed, 14 insertions(+), 1 deletions(-)
--
Generated by git-murpp 0.8.0
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH pve-manager 1/3] proxmox-network-interface-pinning: die on failing to write interfaces
2025-07-17 15:28 [pve-devel] [PATCH manager 0/3] backport 'proxmox-network-interface-pinning fixes' Stefan Hanreich
@ 2025-07-17 15:28 ` Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 2/3] proxmox-network-interface-pinning: fix pinning after reboot Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 3/3] pve-sdn-commit: add ifreload Stefan Hanreich
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-07-17 15:28 UTC (permalink / raw)
To: pve-devel
lock_file sets the error variable in perl, but does not die if it
encounters an error in the callback. All other invocations of
lock_file already die, but it was missing for writing the interfaces
s file, which swallowed errors.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
PVE/CLI/proxmox_network_interface_pinning.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/PVE/CLI/proxmox_network_interface_pinning.pm b/PVE/CLI/proxmox_network_interface_pinning.pm
index ea98ccb5e..b45cc973a 100644
--- a/PVE/CLI/proxmox_network_interface_pinning.pm
+++ b/PVE/CLI/proxmox_network_interface_pinning.pm
@@ -95,6 +95,7 @@ my sub update_etc_network_interfaces {
};
PVE::Tools::lock_file("/etc/network/.pve-interfaces.lock", 10, $code);
+ die $@ if $@;
}
my sub update_host_fw_config {
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH pve-manager 2/3] proxmox-network-interface-pinning: fix pinning after reboot
2025-07-17 15:28 [pve-devel] [PATCH manager 0/3] backport 'proxmox-network-interface-pinning fixes' Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 1/3] proxmox-network-interface-pinning: die on failing to write interfaces Stefan Hanreich
@ 2025-07-17 15:28 ` Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 3/3] pve-sdn-commit: add ifreload Stefan Hanreich
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-07-17 15:28 UTC (permalink / raw)
To: pve-devel
We generate a list of existing pins as a reference throughout the
pinning tool. It works by reading the existing link files and looking
up interfaces with the corresponding MAC address. If pins have already
been applied, this would return a mapping of the pinned name to itself
(nic0 => nic0).
We use this list for filtering what we write to the pending
configuration, in order to avoid re-introducing already pinned names
to the pending configuration. This reflexive entry would cause the
interfaces file generation to filter all pinned network interfaces
after reboot, leading to invalid ifupdown2 configuration files. Fix
this by filtering entries in the existing-pins list who are reflexive.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
PVE/CLI/proxmox_network_interface_pinning.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/CLI/proxmox_network_interface_pinning.pm b/PVE/CLI/proxmox_network_interface_pinning.pm
index b45cc973a..9dbf91e73 100644
--- a/PVE/CLI/proxmox_network_interface_pinning.pm
+++ b/PVE/CLI/proxmox_network_interface_pinning.pm
@@ -311,7 +311,8 @@ sub resolve_pinned {
next;
}
- $resolved->{ $mac_lookup{$mac} } = $pinned->{$mac};
+ $resolved->{ $mac_lookup{$mac} } = $pinned->{$mac}
+ if $mac_lookup{$mac} ne $pinned->{$mac};
}
return $resolved;
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH pve-manager 3/3] pve-sdn-commit: add ifreload
2025-07-17 15:28 [pve-devel] [PATCH manager 0/3] backport 'proxmox-network-interface-pinning fixes' Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 1/3] proxmox-network-interface-pinning: die on failing to write interfaces Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 2/3] proxmox-network-interface-pinning: fix pinning after reboot Stefan Hanreich
@ 2025-07-17 15:28 ` Stefan Hanreich
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-07-17 15:28 UTC (permalink / raw)
To: pve-devel
After generating the ifupdown2 configuration in SDN and before
generating the FRR configuration in SDN, we need to apply the changes
in ifupdown2, since the FRR generation logic relies on the network
configuration being applied in order to generate a correct FRR
configuration file.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
bin/pve-sdn-commit | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/bin/pve-sdn-commit b/bin/pve-sdn-commit
index 2654e17ed..69f93584e 100644
--- a/bin/pve-sdn-commit
+++ b/bin/pve-sdn-commit
@@ -4,11 +4,22 @@ use strict;
use warnings;
use PVE::Network::SDN;
+use PVE::Tools;
PVE::Network::SDN::commit_config();
PVE::Network::SDN::generate_zone_config();
PVE::Network::SDN::generate_dhcp_config();
+
+my $err = sub {
+ my $line = shift;
+ if ($line =~ /(warning|error): (\S+):/) {
+ print "$2 : $line \n";
+ }
+};
+
+PVE::Tools::run_command(['ifreload', '-a'], errfunc => $err);
+
PVE::Network::SDN::generate_controller_config(1);
exit 0;
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-17 15:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-17 15:28 [pve-devel] [PATCH manager 0/3] backport 'proxmox-network-interface-pinning fixes' Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 1/3] proxmox-network-interface-pinning: die on failing to write interfaces Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 2/3] proxmox-network-interface-pinning: fix pinning after reboot Stefan Hanreich
2025-07-17 15:28 ` [pve-devel] [PATCH pve-manager 3/3] pve-sdn-commit: add ifreload Stefan Hanreich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox