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>
Used for obtaining the IPSets that get autogenerated by the nftables
firewall. The returned configuration has the same format as the
pve-firewall uses internally, making it compatible with the existing
pve-firewall code.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Reviewed-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Tested-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Hannes Dürr <h.duerr@proxmox.com>
This is a simple, cache implementation which can be accessed from
multiple processes. It also supports storing a range of historical
values.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
[wb: also update pmg-rs/Cargo.toml and both d/control files]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
For PMG we for now only provide an empty stub and warn to syslog -
we need basic notification system integration there first.
On PMG, we still use a pure Perl implementation at the moment,
so this should not be an issue unless we change that.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Fixes the following new warning that appeared after switching
to rust 1.77:
warning: `proxmox-perl-rs/pve-rs/.cargo/config` is deprecated in
favor of `config.toml`
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
they then get stripped into their own package anyway, but without this we don't
get debug symbols at all with rustc >= 1.77
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
The context has now been moved to `proxmox-notify` due to the fact
that we also need it in `proxmox-mail-forward` now.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
but this time, without any start load on the node. This test fails
with librust-proxmox-resource-scheduling-dev=0.2.0-1
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Instead of blessed raw pointers as these can easily lead to double
free corruptions when they're copied in perl.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>