[pve-devel] [PATCH pve-manager 1/3] proxmox-network-interface-pinning: die on failing to write interfaces

Stefan Hanreich s.hanreich at proxmox.com
Thu Jul 17 17:28:54 CEST 2025


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 at 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




More information about the pve-devel mailing list