mirror of
https://git.proxmox.com/git/proxmox-perl-rs
synced 2025-05-22 21:51:38 +00:00
firewall: sdn: ignore EPERM when reading the legacy IPAM file
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@proxmox.com> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
This commit is contained in:
parent
7ae468de65
commit
f83a9a6367
@ -127,6 +127,7 @@ mod export {
|
||||
match fs::read_to_string(SDN_IPAM_LEGACY) {
|
||||
Ok(data) => add_ipam_ipsets(data)?,
|
||||
Err(e) if e.kind() == io::ErrorKind::NotFound => (),
|
||||
Err(e) if e.kind() == io::ErrorKind::PermissionDenied => (),
|
||||
Err(e) => bail!("Cannot open legacy IPAM database: {e:#}"),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user