[pve-devel] [PATCH pve-network] dns: only update rrsets which matches the rrset type

2023-12-05 Thread Matthieu Pignolet
PowerDNS does not allow multiple dns types in the same rrset, this patch enables the use of multiple rrset for each types of records. This fixes an issue when using dual stack ips (Both IPv4 and IPv6) with the same dns suffix. --- src/PVE/Network/SDN/Dns/PowerdnsPlugin.pm | 13 +++-- 1 fi

[pve-devel] arp-filter doesn't work with alias

2023-12-05 Thread Harald Leithner
Hi, using an alias in ipfilter-net0 doesn't create an tapxxx-OUT-ARP entry in ebtables. It works if the ipfilter-net0 ipset is an IP-address. Other topic, is there a reason why no incoming arp request filter is set automatically? I asked this back in 2018 and found it a couple of times on th

[pve-devel] [PATCH container] config list helper: fix return type of vmid for container index API enpoint

2023-12-05 Thread Fiona Ebner
The schema declares it to be an integer. Done in the config_list() helper, to ensure consistency for the following existing code in vmstatus(): > my $list = $opt_vmid ? { $opt_vmid => { type => 'lxc', vmid => int($opt_vmid) > }} : config_list(); Should not cause any issues for other callers of t

[pve-devel] [PATCH proxmox 3/5] time: posix: add bindings for strftime_l

2023-12-05 Thread Lukas Wagner
This variant of strftime can be provided with a locale_t, which determines the locale used for time formatting. A struct `Locale` was also introduced as a safe wrapper around locale_t. Signed-off-by: Lukas Wagner --- proxmox-time/src/posix.rs | 99 +++ 1 file

[pve-devel] [PATCH proxmox 1/5] time: posix: use strftime from the `libc` crate.

2023-12-05 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-time/src/posix.rs | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs index 6157f8b..c463ab3 100644 --- a/proxmox-time/src/posix.rs +++ b/proxmox-time/src/posix.rs @@ -108,

[pve-devel] [PATCH proxmox 2/5] time: posix: inline vars in string formatting

2023-12-05 Thread Lukas Wagner
No functional changes. Signed-off-by: Lukas Wagner --- proxmox-time/src/posix.rs | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs index c463ab3..5913816 100644 --- a/proxmox-time/src/posi

[pve-devel] [PATCH proxmox 4/5] time: posix: add epoch_to_rfc2822

2023-12-05 Thread Lukas Wagner
This is the format used in the 'Date' header in mails. Signed-off-by: Lukas Wagner --- proxmox-time/src/posix.rs | 16 1 file changed, 16 insertions(+) diff --git a/proxmox-time/src/posix.rs b/proxmox-time/src/posix.rs index 9c8002a..96bc88e 100644 --- a/proxmox-time/src/posix.

[pve-devel] [PATCH proxmox 5/5] sys: email: use `epoch_to_rfc2822` from proxmox_time

2023-12-05 Thread Lukas Wagner
`strftime`'s formatting is locale-dependent. If the system locale was set to e.g. de_DE.UTF-8, the `Date` header became invalid (e.g Mo instead of Mon for 'Monday'), tripping up some mail clients (e.g. KMail). This commit should fix this by using the new `epoch_to_rfc2822` function from proxmox_ti

[pve-devel] [PATCH proxmox 0/5] sys: email: always format 'Date' header with C locale

2023-12-05 Thread Lukas Wagner
This patch series makes the formatting of the 'Date' header for sent emails independent of the system locale. Previously, strftime was used to generate the header, but since this function is locale-aware, invalid Date headers could be generated. As an example, if the locale was `de_DE.UTF-8`, then

[pve-devel] [PATCH pve-network 4/4] tests: run tests in sbuild

2023-12-05 Thread Stefan Lendl
Signed-off-by: Stefan Lendl --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index c9dee4c..c4056b4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,7 +10,7 @@ clean: .PHONY: test test: - [ -e /run/lock/sbuild ] || $(MAK

[pve-devel] [PATCH pve-network 0/4] SDN tests in sbuild

2023-12-05 Thread Stefan Lendl
Extract and mock functions that otherwise access system files which is not possible in a clean sbuild environment. Namely /etc/network/interfaces as well as /etc/frr/frr.config.local Stefan Lendl (4): refactor(controllers): extract read_etc_network_interfaces refactor(evpn): extract read_local

[pve-devel] [PATCH pve-network 4/4] tests: run tests in sbuild

2023-12-05 Thread Stefan Lendl
Signed-off-by: Stefan Lendl --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index c9dee4c..c4056b4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,7 +10,7 @@ clean: .PHONY: test test: - [ -e /run/lock/sbuild ] || $(MAK

[pve-devel] [PATCH pve-network 1/4] refactor(controllers): extract read_etc_network_interfaces

2023-12-05 Thread Stefan Lendl
Allows mocking local fs access Signed-off-by: Stefan Lendl --- src/PVE/Network/SDN/Controllers.pm | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/PVE/Network/SDN/Controllers.pm b/src/PVE/Network/SDN/Controllers.pm index 167d3ea..fd7ad54 100644 --- a/src

[pve-devel] [PATCH pve-network 3/4] tests: mocking more functions to avoid access to system files

2023-12-05 Thread Stefan Lendl
previously extracted functions are now mocked in the zone tests mocked PVE::Network::SDN::Controllers::read_etc_network_interfaces and also INotify::read_etc_network_interfaces to return the same $interfaces_config created a mock for several PVE::Network::SDN::Controllers::Plugin methods that wou

[pve-devel] [PATCH pve-network 2/4] refactor(evpn): extract read_local_frr_config

2023-12-05 Thread Stefan Lendl
Allows mocking local fs access Signed-off-by: Stefan Lendl --- src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm index f320139

Re: [pve-devel] [PATCH pve-network 3/4] tests: mocking more functions to avoid access to system files

2023-12-05 Thread Lukas Wagner
On 12/5/23 14:12, Stefan Lendl wrote: diff --git a/src/test/run_test_zones.pl b/src/test/run_test_zones.pl index ce8edc2..2d9be88 100755/ --- a/src/test/run_test_zones.pl +++ b/src/test/run_test_zones.pl @@ -14,6 +14,10 @@ use PVE::Network::SDN::Zones; use PVE::Network::SDN::Controllers; use

[pve-devel] [PATCH pve-network 2/2] gitignore: sort gitignore

2023-12-05 Thread Stefan Lendl
Signed-off-by: Stefan Lendl --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 90aa0f8..4694865 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ *.deb +/*.build /*.buildinfo /*.changes +/*.dsc /.vscode/ /libpve-network

[pve-devel] [PATCH pve-network 1/2] gitignore: build artifacts from sbuild

2023-12-05 Thread Stefan Lendl
source package *.dsc build log *.build tarball *.tar.xz Signed-off-by: Stefan Lendl --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 60332cc..90aa0f8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ /*.changes /.vscode/ /libpve-networ

[pve-devel] [PATCH pve-manager] ui: lxc: add firewall log view filtering

2023-12-05 Thread Christian Ebner
Allow to filter firewall logs analogous to node and VM firewall logs. Signed-off-by: Christian Ebner --- www/manager6/lxc/Config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/manager6/lxc/Config.js b/www/manager6/lxc/Config.js index 4516ee8f..8ef66f39 100644 --- a/www/manager6/lxc

Re: [pve-devel] [PATCH pve-network 3/4] tests: mocking more functions to avoid access to system files

2023-12-05 Thread Stefan Lendl
Lukas Wagner writes: > > Left-over debug code? :) Yes, I am not actually using this here. This is also included in the other tests. ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

[pve-devel] [RFC proxmox-widget-toolkit, pve-manager 0/2] Copy Button For Wizard Disk Configuration

2023-12-05 Thread Max Carrara
When creating a VM for testing purposes, e.g. a VM that's supposed to have 8 disks to test something in regards to ZFS, it's necessary to manually edit the configuration and repeatedly click on all desired options by hand - for every single disk. I always wished there was a copy button, so I decide

[pve-devel] [RFC proxmox-widget-toolkit 1/2] input panel: add `raw` parameter to function `getValues`

2023-12-05 Thread Max Carrara
This parameter may be used to circumvent calls to `onGetValues`. Also adds a docstring for the function. Signed-off-by: Max Carrara --- src/panel/InputPanel.js | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/panel/InputPanel.js b/src/panel/InputPanel.js i

[pve-devel] [RFC pve-manager 1/2] multi disk edit: add copy button

2023-12-05 Thread Max Carrara
Add a copy button that copies the configuration of one disk to a new one. Signed-off-by: Max Carrara --- www/manager6/panel/MultiDiskEdit.js | 78 + 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/www/manager6/panel/MultiDiskEdit.js b/www/manager6/pan

[pve-devel] [PATCH v6 qemu-server 1/4] Move path_is_scsi to QemuServer/Drive.pm

2023-12-05 Thread Hannes Duerr
Prepare for introduction of new helper Signed-off-by: Hannes Duerr --- PVE/QemuServer.pm | 62 +--- PVE/QemuServer/Drive.pm | 63 + 2 files changed, 64 insertions(+), 61 deletions(-) diff --git a/PVE/QemuServer.pm

[pve-devel] [PATCH v6 qemu-server 2/4] Move NEW_DISK_RE to QemuServer/Drive.pm

2023-12-05 Thread Hannes Duerr
Prepare for introduction of new helper Signed-off-by: Hannes Duerr --- PVE/API2/Qemu.pm| 10 -- PVE/QemuServer/Drive.pm | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index f26adf5..9e3cfb5 100644 --- a/PVE/API2/Qemu.pm

[pve-devel] [PATCH v6 qemu-server 3/4] drive: Create get_scsi_devicetype

2023-12-05 Thread Hannes Duerr
Encapsulation of the functionality for determining the scsi device type in a new function for reusability in QemuServer/Drive.pm Signed-off-by: Hannes Duerr --- PVE/QemuServer.pm | 29 - PVE/QemuServer/Drive.pm | 35 ++- 2 files c

[pve-devel] [PATCH v6 qemu-server 4/4] fix #4957: add vendor and product information passthrough for SCSI-Disks

2023-12-05 Thread Hannes Duerr
adds vendor and product information for SCSI devices to the json schema and checks in the VM create/update API call if it is possible to add these to QEMU as a device option Signed-off-by: Hannes Duerr --- PVE/API2/Qemu.pm| 38 ++ PVE/QemuServer.pm

[pve-devel] [PATCH v6 qemu-server 0/4] fix #4957: add vendor and product information passthrough for SCSI-Disks

2023-12-05 Thread Hannes Duerr
changes in v3: - splitup into preparation and fix patch - move get_scsi_devicetype into QemuServer/Drive.pm - refactor check_scsi_feature_compatibility to assert_scsi_feature_compatibility - assert_scsi_feature_compatibility before creating the device - handle 'local-lvm:' syntax in get_scsi_devi