[pve-devel] applied: [PATCH proxmox-perl-rs 1/1] firewall: sdn: ignore EPERM when reading the legacy IPAM file

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Nov 20 16:25:40 CET 2024


Am 20.11.24 um 15:47 schrieb Stefan Hanreich:
> On fresh installations, neither the new nor the old IPAM db file
> exist. This triggers our fallback code path and leads to errors in the
> syslog on fresh installs where there is no IPAM database. This happens
> whenever a firewall API call is made. Because of this, we choose to
> ignore EPERM when reading the legacy files. This is okay, because we
> move existing databases in the postinstall script of
> libpve-network-perl, making the situation where the new file does not
> exist, but the old file exists unlikely.
> 
> Reported-by: Alexander Zeidler <a.zeidler at proxmox.com>
> Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
> ---
> The change from () to {} is due to rustfmt quirks. Adding the or made
> rustfmt change () to {()}, leading to another complaint by clippy
> about an unnecessary unit type in the closure, which I then removed.

I changed it a bit to be added as separate match arm, being explicit here
can be nice w.r.t. using git blame to find out why this is the way it is.

> 
>  pve-rs/src/firewall/sdn.rs | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
>

applied, thanks!




More information about the pve-devel mailing list