Re: [pve-devel] [PATCH ifupdown2] patch: fix bond mac address at boot.

2023-11-14 Thread DERUMIER, Alexandre
Hi, Something definitively wrong with this patch https://forum.proxmox.com/threads/same-mac-on-all-lacp-bonds-bridges-after-upgrade-proxmox-8.136359/ This forum user is getting mac of his fiber transceiver at boot...(that's superstange as they shouldn't have a mac address) I think that it's

[pve-devel] applied: [PATCH v2 container] api: network: get interfaces from containers

2023-11-14 Thread Thomas Lamprecht
Am 15/06/2023 um 11:43 schrieb Leo Nunner: > Adds an 'interfaces' endpoint in the API > (/nodes/{node}/lxc/{vmid}/interfaces'), which returns a list of > interface names, together with a MAC, IPv4 and IPv6 address. This list > may be expanded in the future. Note that this is only returned for >

[pve-devel] [WIP v3 qemu-server 21/22] api2: create|restore|clone: add_free_ip

2023-11-14 Thread Stefan Hanreich
From: Alexandre Derumier Signed-off-by: Stefan Hanreich --- PVE/API2/Qemu.pm | 6 ++ PVE/QemuServer.pm | 31 +++ 2 files changed, 37 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 38bdaab..a0f8243 100644 --- a/PVE/API2/Qemu.pm +++

[pve-devel] [WIP v3 pve-manager 16/22] sdn: add DHCP option to Zone dialogue

2023-11-14 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- www/manager6/sdn/zones/Base.js | 4 ++-- www/manager6/sdn/zones/SimpleEdit.js | 10 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/www/manager6/sdn/zones/Base.js b/www/manager6/sdn/zones/Base.js index 602e4c16b..80ce51bac

[pve-devel] [WIP v3 qemu-server 19/22] vmnic add|remove : add|del ip in ipam

2023-11-14 Thread Stefan Hanreich
From: Alexandre Derumier Signed-off-by: Stefan Hanreich --- PVE/QemuServer.pm | 38 ++ 1 file changed, 38 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index c465fb6..1ae1cb0 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -64,6

[pve-devel] [WIP v3 pve-network 13/22] dhcp: regenerate config for DHCP servers on reload

2023-11-14 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- src/PVE/Network/SDN.pm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm index 057034f..c306527 100644 --- a/src/PVE/Network/SDN.pm +++ b/src/PVE/Network/SDN.pm @@ -12,6 +12,7 @@ use

[pve-devel] [WIP v3 pve-network 09/22] sdn: dhcp: add helper for creating DHCP leases

2023-11-14 Thread Stefan Hanreich
Co-Authored-By: Alexandre Derumier Signed-off-by: Stefan Hanreich --- src/PVE/Network/SDN/Dhcp.pm | 115 +++ src/PVE/Network/SDN/Makefile | 2 +- 2 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 src/PVE/Network/SDN/Dhcp.pm diff --git

[pve-devel] [WIP v3 pve-network 11/22] api: subnet: add dhcp ranges

2023-11-14 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- src/PVE/API2/Network/SDN/Subnets.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/API2/Network/SDN/Subnets.pm b/src/PVE/API2/Network/SDN/Subnets.pm index eb6b41b..c263cd5 100644 --- a/src/PVE/API2/Network/SDN/Subnets.pm +++

[pve-devel] [WIP v3 pve-network 12/22] api: zone: add dhcp options

2023-11-14 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- src/PVE/API2/Network/SDN/Zones.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/API2/Network/SDN/Zones.pm b/src/PVE/API2/Network/SDN/Zones.pm index 4c8b7e1..1c3356e 100644 --- a/src/PVE/API2/Network/SDN/Zones.pm +++

[pve-devel] [WIP v3 cluster/network/manager/qemu-server 00/22] Add support for DHCP servers to SDN

2023-11-14 Thread Stefan Hanreich
This patch series adds support for automatically deploying dnsmasq as a DHCP server to a simple SDN Zone. This is mostly an update for Alexandre, Stefan and Thomas so we have a consolidated base for further development of this feature. Code and UI is (very) rough in some places, but all the

[pve-devel] [WIP v3 pve-network 02/22] sdn: preparations for DHCP plugin

2023-11-14 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- src/PVE/Network/SDN/Subnets.pm | 25 + src/PVE/Network/SDN/Vnets.pm | 27 +-- src/PVE/Network/SDN/Zones.pm | 34 +- 3 files changed, 51 insertions(+), 35 deletions(-) diff

[pve-devel] [WIP v3 pve-network 04/22] sdn: zone: add dhcp options

2023-11-14 Thread Stefan Hanreich
Co-Authored-By: Alexandre Derumier Signed-off-by: Stefan Hanreich --- src/PVE/Network/SDN/Zones/SimplePlugin.pm | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/PVE/Network/SDN/Zones/SimplePlugin.pm b/src/PVE/Network/SDN/Zones/SimplePlugin.pm index 4922903..f30278c

[pve-devel] [WIP v3 pve-manager 18/22] sdn: dhcp: add view for DHCP mappings

2023-11-14 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- www/css/ext6-pve.css| 10 +- www/manager6/Makefile | 2 + www/manager6/dc/Config.js | 12 +- www/manager6/sdn/MappingEdit.js | 65 ++ www/manager6/tree/DhcpTree.js | 215 5 files

[pve-devel] [WIP v3 pve-manager 17/22] sdn: subnet: add panel for editing DHCP ranges

2023-11-14 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- www/manager6/sdn/SubnetEdit.js | 161 - 1 file changed, 160 insertions(+), 1 deletion(-) diff --git a/www/manager6/sdn/SubnetEdit.js b/www/manager6/sdn/SubnetEdit.js index b9825d2a3..ab3b9d021 100644 ---

[pve-devel] [WIP v3 pve-network 06/22] ipam: plugins: preparations for DHCP

2023-11-14 Thread Stefan Hanreich
Co-Authored-By: Alexandre Derumier Signed-off-by: Stefan Hanreich --- src/PVE/Network/SDN/Ipams.pm | 80 +++- src/PVE/Network/SDN/Ipams/NetboxPlugin.pm | 86 -- src/PVE/Network/SDN/Ipams/PVEPlugin.pm | 85 +++--

[pve-devel] [WIP v3 pve-network 05/22] sdn: subnet: vnet: refactor IPAM related methods

2023-11-14 Thread Stefan Hanreich
Co-Authored-By: Alexandre Derumier Signed-off-by: Stefan Hanreich --- src/PVE/Network/SDN/SubnetPlugin.pm | 3 +- src/PVE/Network/SDN/Subnets.pm | 50 ++- src/PVE/Network/SDN/Vnets.pm| 95 + 3 files changed, 92 insertions(+), 56 deletions(-)

[pve-devel] [WIP v3 qemu-server 22/22] vm_destroy: delete ip from ipam && dhcp

2023-11-14 Thread Stefan Hanreich
From: Alexandre Derumier Co-Authored-By: Stefan Hanreich Signed-off-by: Stefan Hanreich --- PVE/QemuServer.pm | 17 + 1 file changed, 17 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index fecdb9c..c9c061c 100644 --- a/PVE/QemuServer.pm +++

[pve-devel] [WIP v3 pve-network 08/22] sdn: dhcp: add dnsmasq plugin

2023-11-14 Thread Stefan Hanreich
Co-Authored-By: Alexandre Derumier Signed-off-by: Stefan Hanreich --- debian/control | 1 + src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 198 2 files changed, 199 insertions(+) create mode 100644 src/PVE/Network/SDN/Dhcp/Dnsmasq.pm diff --git

[pve-devel] [WIP v3 qemu-server 20/22] vm_start : vm-network-scripts: get ip from ipam and add dhcp reservation

2023-11-14 Thread Stefan Hanreich
From: Alexandre Derumier Signed-off-by: Stefan Hanreich --- vm-network-scripts/pve-bridge | 5 + 1 file changed, 5 insertions(+) diff --git a/vm-network-scripts/pve-bridge b/vm-network-scripts/pve-bridge index d37ce33..24efaad 100755 --- a/vm-network-scripts/pve-bridge +++

[pve-devel] [WIP v3 pve-network 14/22] sdn: fix tests

2023-11-14 Thread Stefan Hanreich
From: Alexandre Derumier Signed-off-by: Stefan Hanreich --- src/test/run_test_subnets.pl | 8 +++- src/test/run_test_vnets.pl | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/test/run_test_subnets.pl b/src/test/run_test_subnets.pl index f6564e1..c98359a 100755

[pve-devel] [WIP v3 pve-network 10/22] api: add IPAM endpoints

2023-11-14 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- src/PVE/API2/Network/SDN.pm | 6 ++ src/PVE/API2/Network/SDN/Ipam.pm | 172 ++ src/PVE/API2/Network/SDN/Makefile | 2 +- 3 files changed, 179 insertions(+), 1 deletion(-) create mode 100644

[pve-devel] [WIP v3 pve-manager 15/22] sdn: regenerate DHCP config on reload

2023-11-14 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- PVE/API2/Network.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm index 00d964a79..f39f04f52 100644 --- a/PVE/API2/Network.pm +++ b/PVE/API2/Network.pm @@ -660,6 +660,7 @@ __PACKAGE__->register_method({

[pve-devel] [WIP v3 pve-network 07/22] dhcp: add abstract class for DHCP plugins

2023-11-14 Thread Stefan Hanreich
Co-Authored-By: Alexandre Derumier Signed-off-by: Stefan Hanreich --- src/PVE/Network/SDN/Dhcp/Makefile | 8 src/PVE/Network/SDN/Dhcp/Plugin.pm | 65 ++ src/PVE/Network/SDN/Makefile | 1 + 3 files changed, 74 insertions(+) create mode 100644

[pve-devel] [WIP v3 pve-network 03/22] subnet: add dhcp options

2023-11-14 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- src/PVE/Network/SDN/SubnetPlugin.pm | 29 + src/PVE/Network/SDN/Subnets.pm | 23 +++ 2 files changed, 52 insertions(+) diff --git a/src/PVE/Network/SDN/SubnetPlugin.pm b/src/PVE/Network/SDN/SubnetPlugin.pm

[pve-devel] [WIP v3 pve-cluster 01/22] add priv/macs.db

2023-11-14 Thread Stefan Hanreich
From: Alexandre Derumier use to cache mac-ip list association. can be use by external ipam, firewall,etc for fast lookup Signed-off-by: Alexandre Derumier --- src/PVE/Cluster.pm | 1 + src/pmxcfs/status.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/PVE/Cluster.pm

[pve-devel] applied-series: [PATCH installer 0/2] minimal changes for a working serial installation

2023-11-14 Thread Thomas Lamprecht
Am 14/11/2023 um 18:31 schrieb Stoiko Ivanov: > patch 1/2 is a tiny issue I ran into while building the installer > > patch 2/2 adds the correct console parameter for serial installations > patch 2/2 needs some further work (the other kernel cmdline parameter > matchings are probably wrong as

Re: [pve-devel] [PATCH v2 container] api: network: get interfaces from containers

2023-11-14 Thread DERUMIER, Alexandre
Message initial De: Thomas Lamprecht À: Proxmox VE development discussion , "DERUMIER, Alexandre" Objet: Re: [pve-devel] [PATCH v2 container] api: network: get interfaces from containers Date: 14/11/2023 18:00:30 Am 14/11/2023 um 17:43 schrieb DERUMIER, Alexandre: > Any chance

[pve-devel] [PATCH installer 2/2] serial install: fix console parameter parsing

2023-11-14 Thread Stoiko Ivanov
The regex matching in Proxmox::Install::Config was blindly copied from above - so the other parameters are also likely to not get recognized if they are the last on the cmdline Signed-off-by: Stoiko Ivanov --- Proxmox/Install.pm| 2 +- Proxmox/Install/Config.pm | 2 +- 2 files changed,

[pve-devel] [PATCH installer 0/2] minimal changes for a working serial installation

2023-11-14 Thread Stoiko Ivanov
patch 1/2 is a tiny issue I ran into while building the installer patch 2/2 adds the correct console parameter for serial installations patch 2/2 needs some further work (the other kernel cmdline parameter matchings are probably wrong as well, additionally #4747 would be a better and more

[pve-devel] [PATCH installer 1/2] d/control: add libgtk3-perl to B-D

2023-11-14 Thread Stoiko Ivanov
With the first tests entering the installer in 9a0d66cb36d395a1186904132aed1d5dc33a0937 we now need libgtk3-perl during package-building with `make deb` Signed-off-by: Stoiko Ivanov --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index

Re: [pve-devel] [PATCH v2 container] api: network: get interfaces from containers

2023-11-14 Thread Thomas Lamprecht
Am 14/11/2023 um 17:43 schrieb DERUMIER, Alexandre: > Any chance to have this commit applied for pve 8.1 ? Would be fine for me. Did you test it? ___ pve-devel mailing list pve-devel@lists.proxmox.com

Re: [pve-devel] [PATCH v2 container] api: network: get interfaces from containers

2023-11-14 Thread DERUMIER, Alexandre
Hi, Any chance to have this commit applied for pve 8.1 ? I have a customer who's need this feature. Message initial De: Leo Nunner Répondre à: Proxmox VE development discussion À: pve-devel@lists.proxmox.com Objet: [pve-devel] [PATCH v2 container] api: network: get

[pve-devel] applied: [PATCH v2 debcargo-conf 02/52] update lettre to 0.11.1

2023-11-14 Thread Thomas Lamprecht
Am 14/11/2023 um 13:59 schrieb Lukas Wagner: > Signed-off-by: Lukas Wagner > --- > src/lettre/debian/changelog | 10 +++ > .../debian/patches/downgrade_fastrand.patch | 13 > .../debian/patches/downgrade_idna.patch | 13 >

[pve-devel] applied: [PATCH v2 debcargo-conf 01/52] cherry-pick chumsky 0.9.2 from debian unstable

2023-11-14 Thread Thomas Lamprecht
Am 14/11/2023 um 13:59 schrieb Lukas Wagner: > Signed-off-by: Lukas Wagner > --- > src/chumsky/debian/changelog | 5 +++ > src/chumsky/debian/copyright | 39 + > src/chumsky/debian/copyright.debcargo.hint | 51 ++ >

[pve-devel] applied-series: [PATCH widget-toolkit/manager] improve combogrid default value handling

2023-11-14 Thread Thomas Lamprecht
Am 19/07/2023 um 14:11 schrieb Dominik Csapak: > pve-manager: > > Dominik Csapak (3): > ui: ipset: make ip/cidr required > ui: don't set the default value of combogrids to '' > ui: don't set the default value of combogrids to [] > applied those now too, thanks!

[pve-devel] applied: [PATCH v2 proxmox-widget-toolkit manager pmg-gui 0/4] #4442: impl firewall log filtering

2023-11-14 Thread Thomas Lamprecht
Am 09/08/2023 um 12:55 schrieb Christian Ebner: > This series is send to pmg-devel and pve-devel list, as it changes the > DateTimeField used by Proxmox Virtual Environment and Proxmox Mail > Gateway. > > This series of patches implements functionality to extend the firewall > log panel to filter

[pve-devel] applied: [PATCH kernel] backport UBSAN fixes for amdgpu

2023-11-14 Thread Thomas Lamprecht
Am 14/11/2023 um 13:14 schrieb Fiona Ebner: > to silence array-index-out-of-bounds warnings for dynamically-sized > arrays. All commits applied cleanly and just replace array[1] with > array[]. > > Signed-off-by: Fiona Ebner > --- > ...N-array-index-out-of-bounds-for-SMU7.patch | 63 >

[pve-devel] [PATCH storage] fix #5008: prevent adding pbs storage with invalid namespace

2023-11-14 Thread Philipp Hufnagl
Currently, when adding a PBS storage with a namespace that does not exist, the storage gets added normally, but browsing/using it only returns a cryptic error message. This change checks if the namespace entered when adding is valid and prompts an error if it is not. If no namespace is provided,

Re: [pve-devel] [RFC common 2/2] fix #4501: next unused port: work around issue with too short expiretime

2023-11-14 Thread Fiona Ebner
Am 14.11.23 um 15:02 schrieb Fiona Ebner: > For QEMU migration via TCP, there's a bit of time between port > reservation and usage, because currently, the port needs to be > reserved before doing a fork, where the systemd scope needs to be set > up and swtpm might need to be started before the

Re: [pve-devel] [PATCH acme-rs/backup/perl-rs/pmg-api 0/8] add external account binding to pmg and pbs

2023-11-14 Thread Folke Gleumes
Please ignore this, wrong mailing list On Tue, 2023-11-14 at 15:07 +0100, Folke Gleumes wrote: > Following the implementation for pve [0], this implements external > account > binding for pmg and pbs. > > For pmg, the tos endpoint was replaced with a meta endpoint, for pbs > this was not

[pve-devel] [PATCH backup 4/8] cli: acme: add possibility to set eab via the cli

2023-11-14 Thread Folke Gleumes
If the ca demands external account binding credentials, the user will be asked for them. If a custom directory is used, the user will be asked if eab should be used. Signed-off-by: Folke Gleumes --- src/acme/client.rs | 2 +- src/bin/proxmox_backup_manager/acme.rs | 51

[pve-devel] [PATCH backup 3/8] acme: api: add eab options to api

2023-11-14 Thread Folke Gleumes
Optionally allow for setting external account binding credentials at the account registration endpoint. Signed-off-by: Folke Gleumes --- src/acme/client.rs | 7 +- src/api2/config/acme.rs| 35 +++---

[pve-devel] [PATCH acme-rs 2/8] add meta fields returned by the directory

2023-11-14 Thread Folke Gleumes
According to the rfc, the meta field contains additional fields that weren't covered by the Meta struct. Of the additional fields, only external_account_required will be used in the near future, but others were added for completeness and the case that they might be used in the future.

[pve-devel] [PATCH acme-rs/backup/perl-rs/pmg-api 0/8] add external account binding to pmg and pbs

2023-11-14 Thread Folke Gleumes
Following the implementation for pve [0], this implements external account binding for pmg and pbs. For pmg, the tos endpoint was replaced with a meta endpoint, for pbs this was not necessary, although it might be in the future if the functionality is introduced in the gui. Similar to the pve

[pve-devel] [PATCH pmg-api 8/8] cli: acme: expose acme eab options on the cli

2023-11-14 Thread Folke Gleumes
interactively ask for external account binding credentials if either: * the ca requests it * a custom ca is used Signed-off-by: Folke Gleumes --- src/PMG/CLI/pmgconfig.pm | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/PMG/CLI/pmgconfig.pm

[pve-devel] [PATCH pmg-api 6/8] api: acme: add eab parameters

2023-11-14 Thread Folke Gleumes
Signed-off-by: Folke Gleumes --- src/PMG/API2/ACME.pm | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/PMG/API2/ACME.pm b/src/PMG/API2/ACME.pm index 42c9f4e..9e3eb8d 100644 --- a/src/PMG/API2/ACME.pm +++ b/src/PMG/API2/ACME.pm @@ -132,6 +132,18 @@

[pve-devel] [PATCH pmg-api 7/8] api: acme: deprecate tos endpoint in favor of new meta endpoint

2023-11-14 Thread Folke Gleumes
The ToS endpoint ignored data that is needed to detect if EAB needs to be used. Instead of adding a new endpoint that does the same request, the tos endpoint is deprecated and replaced by the meta endpoint, that returns all information returned by the directory. Signed-off-by: Folke Gleumes ---

[pve-devel] [PATCH acme-rs 1/8] add external account binding

2023-11-14 Thread Folke Gleumes
Functionality was added as a additional setter function, which hopefully prevents any breakages. Since a placeholder Option an the AccountData was already present, but has never been used, replacing the field with an Option of a fully defined type should also be minimally intrusive.

[pve-devel] [PATCH perl-rs 5/8] acme: add eab fields for pmg

2023-11-14 Thread Folke Gleumes
Signed-off-by: Folke Gleumes --- pmg-rs/src/acme.rs | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pmg-rs/src/acme.rs b/pmg-rs/src/acme.rs index b38e1ea..fe1e465 100644 --- a/pmg-rs/src/acme.rs +++ b/pmg-rs/src/acme.rs @@ -79,6 +79,7 @@ impl Inner {

[pve-devel] [PATCH] expand helper function by eab credentials

2023-11-14 Thread Folke Gleumes
Signed-off-by: Folke Gleumes --- src/client.rs | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client.rs b/src/client.rs index 78c83a2..53f2688 100644 --- a/src/client.rs +++ b/src/client.rs @@ -367,10 +367,14 @@ impl Client { contact: Vec,

[pve-devel] [RFC qemu-server/common] fix #4501: improve port reservation for QEMU TCP migration

2023-11-14 Thread Fiona Ebner
Each patch is a different approach for improving the situation and each subset could be applied. Personally, I like common 2/2, because it removes the competition for early ports and IMHO the only one worth considering a full fix, but it is a bit complex. Another approach (not in the RFC, also

[pve-devel] [RFC common 1/2] partially fix #4501: next unused port: bump port reservation expiretime

2023-11-14 Thread Fiona Ebner
For QEMU migration via TCP, there's a bit of time between port reservation and usage, because currently, the port needs to be reserved before invoking a fork, where the systemd scope needs to be set up and swtpm might need to be started before the QEMU binary can be invoked and actually use the

[pve-devel] [RFC qemu-server 1/1] partially fix #4501: migration: start vm: move port reservation and usage closer together

2023-11-14 Thread Fiona Ebner
Currently, volume activation, PCI reservation and resetting systemd scope happen in between and the 5 second expiretime used for port reservation might not be enough. Still not ideal, because entering systemd scope and maybe starting swtpm still happen after reservation before the QEMU binary can

[pve-devel] [RFC common 2/2] fix #4501: next unused port: work around issue with too short expiretime

2023-11-14 Thread Fiona Ebner
For QEMU migration via TCP, there's a bit of time between port reservation and usage, because currently, the port needs to be reserved before doing a fork, where the systemd scope needs to be set up and swtpm might need to be started before the QEMU binary can be invoked and actually use the port.

Re: [pve-devel] [PATCH common 2/4] json schema: implement 'oneOf' schema

2023-11-14 Thread Wolfgang Bumiller
mostly LGTM, just minor things On Tue, Nov 14, 2023 at 11:33:37AM +0100, Dominik Csapak wrote: > a schema can now have the 'oneOf' property which is an array of regular > schemas. In the default case any of that has to match. If the > 'type-property'/'instance-types' are given, only the schema

Re: [pve-devel] [PATCH cluster/guest-common/qemu-server/container/manager v2] add backend profile support

2023-11-14 Thread Thomas Lamprecht
Am 14/11/2023 um 11:35 schrieb Dominik Csapak: > This series aims to provide profile support when creating guests (ct/vm) > so that users can reuse options without having to specify them every > time. Great! Nice to see that my hopes^Wexpectations about this being really not that much work/code

[pve-devel] [PATCH v2 proxmox 05/52] notify: replace filters and groups with matcher-based system

2023-11-14 Thread Lukas Wagner
This shifts notification routing into the matcher-system. Every notification has associated metadata (key-value fields, severity - to be extended) that can be match with match directives in notification matchers. Right now, there are 2 matching directives, match-field and match-severity. The first

[pve-devel] [PATCH v2 proxmox 12/52] notify: add 'smtp' endpoint

2023-11-14 Thread Lukas Wagner
This commit adds a new endpoint type, namely 'smtp'. This endpoint uses the `lettre` crate to directly send emails to SMTP relays. The `lettre` crate was chosen since it is by far the most popular SMTP implementation for Rust that looks like it is well maintained. Also, it includes async support

[pve-devel] [PATCH v2 proxmox-widget-toolkit 37/52] notification ui: remove filter setting for targets

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile| 1 - src/form/NotificationFilterSelector.js | 58 - src/panel/GotifyEditPanel.js| 9 src/panel/NotificationGroupEditPanel.js | 9 src/panel/SendmailEditPanel.js |

[pve-devel] [PATCH v2 proxmox-widget-toolkit 44/52] notification ui: add enable checkbox for targets/matchers

2023-11-14 Thread Lukas Wagner
Add a 'enable' checkbox for targets and matchers in their edit windows. Also show a new 'enable' column in the overview panel. The parameter in the config is actually called 'disable', so the UI needs to invert the setting in the appropriate on{Get,Set}Values hooks. Signed-off-by: Lukas Wagner

[pve-devel] [PATCH v2 pve-docs 48/52] notifications: document 'comment' option for targets/matchers

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index acbdfae..e8ed51b 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -67,6 +67,7 @@ accomodate multiple recipients. set, the plugin

[pve-devel] [PATCH v2 pve-manager 33/52] notify: add API routes for smtp endpoints

2023-11-14 Thread Lukas Wagner
The Perl part of the API methods primarily defines the API schema, checks for any needed privileges and then calls the actual Rust implementation exposed via perlmod. Any errors returned by the Rust code are translated into PVE::Exception, so that the API call fails with the correct HTTP error

[pve-devel] [PATCH v2 proxmox-widget-toolkit 40/52] notification: matcher: add UI for matcher editing

2023-11-14 Thread Lukas Wagner
This modifies the old filter edit window in the following ways: - Split content into multiple panels - Name and comment in the first tab - Match rules in a tree-structure in the second tab - Targets to notify in the third tab Signed-off-by: Lukas Wagner --- Notes: The code

[pve-devel] [PATCH v2 proxmox-widget-toolkit 38/52] notification ui: remove notification groups

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile| 1 - src/Schema.js | 5 - src/panel/NotificationConfigView.js | 4 - src/panel/NotificationGroupEditPanel.js | 174 4 files changed, 184 deletions(-) delete

[pve-devel] [PATCH v2 pve-docs 47/52] notifications: document SMTP endpoints

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 47 ++ 1 file changed, 47 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index 764ec72..acbdfae 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -67,6 +67,7 @@

[pve-devel] [PATCH v2 proxmox-mail-forward 51/52] feed forwarded mails into proxmox_notify

2023-11-14 Thread Lukas Wagner
This allows us to send notifications for events from daemons that are not under our control, e.g. zed, smartd, cron. etc... For mail-based notification targets (sendmail, soon smtp) the mail is forwarded as is, including all headers. All other target types will try to parse the email to extra

[pve-devel] [PATCH v2 pve-docs 46/52] notifications: update docs to for matcher-based notifications

2023-11-14 Thread Lukas Wagner
Target groups and filters have been replaced by notification matchers. The matcher can match on certain notification properties and route the notification to a target in case of a match. This patch updates the docs to reflect these changes. Signed-off-by: Lukas Wagner --- notifications.adoc |

[pve-devel] [PATCH v2 pve-manager 35/52] api: notification: simplify ACLs for notification

2023-11-14 Thread Lukas Wagner
Use coarse-grained /mapping/notifications for now. We can always extend later if we need to. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 131 -- 1 file changed, 54 insertions(+), 77 deletions(-) diff --git a/PVE/API2/Cluster/Notifications.pm

[pve-devel] [PATCH v2 pve-manager 25/52] api: notification: add new matcher-based notification API

2023-11-14 Thread Lukas Wagner
This renames filters -> matchers and adds new configuration options needed by matchers (e.g. match-field, match-calendar, etc.) Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 195 ++ 1 file changed, 88 insertions(+), 107 deletions(-) diff --git

[pve-devel] [PATCH v2 proxmox 15/52] notify: add built-in config and 'origin' parameter

2023-11-14 Thread Lukas Wagner
This allows us to define a (modifiable) builtin-config, which is at the moment hardcoded in PVEContext The 'origin' parameter indicates whether a config entry was created by a user, builtin or a modified builtin. These changes require context to be set for tests, so we set PVEContext by default

[pve-devel] [PATCH v2 pve-manager 26/52] ui: dc: remove unneeded notification events panel

2023-11-14 Thread Lukas Wagner
The notification event settings are replaced by notification matchers, which will combine the notification routing and filtering into a single concept. Signed-off-by: Lukas Wagner --- www/manager6/Makefile | 4 - www/manager6/dc/Config.js | 17 +-

[pve-devel] [PATCH v2 pve-docs 49/52] notifications: add documentation for system mail forwarding

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: Changes v2 -> v3: - Dropped paragraph about target/policy, since we now do routing in matchers notifications.adoc | 16 1 file changed, 16 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index

[pve-devel] [PATCH v2 pve-docs 50/52] notifications: change to simplified ACL structure.

2023-11-14 Thread Lukas Wagner
For now, we use a less deeply nested structure. We can always extend it if we need to. Signed-off-by: Lukas Wagner --- notifications.adoc | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index c7bdc5a..74447e5 100644 ---

[pve-devel] [PATCH v2 proxmox 11/52] notify: add PVE/PBS context

2023-11-14 Thread Lukas Wagner
This commit moves PVEContext from `proxmox-perl-rs` into the `proxmox-notify` crate, since we now also need to access it from `promxox-mail-forward`. The context is now hidden behind a feature flag `pve-context`, ensuring that we only compile it when needed. This commit adds PBSContext, since we

[pve-devel] [PATCH v2 proxmox-widget-toolkit 45/52] notification ui: add column for 'origin'

2023-11-14 Thread Lukas Wagner
This column shows whether a matcher/target was provided as a built-in default config or if it was created by the user. For built-ins, it also shows whether the built-in settings have been changed. To reset a built-in entry to its defaults, one can simply delete it. For best UX, the 'delete'

[pve-devel] [PATCH v2 proxmox-mail-forward 52/52] update d/control

2023-11-14 Thread Lukas Wagner
proxmox-schema and proxmox-section config is not required anymore. add new dependency to proxmox-notify. Signed-off-by: Lukas Wagner --- Notes: Changes v2 -> v3: - new in v3 debian/control | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/control

[pve-devel] [PATCH v2 proxmox-widget-toolkit 42/52] noficiation: matcher edit: make 'field' an editable combobox

2023-11-14 Thread Lukas Wagner
For now with fixed options that are shared between most notification events - later, once we have a notification registry, this should be filled dynamically. Signed-off-by: Lukas Wagner --- src/window/NotificationMatcherEdit.js | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-)

[pve-devel] [PATCH v2 proxmox-widget-toolkit 41/52] notification ui: unprotected mailto-root target

2023-11-14 Thread Lukas Wagner
A default notification config will now be created in pve-manager's postinst hook - which is not magic in any way and can be modified and deleted as desired. Signed-off-by: Lukas Wagner --- src/panel/NotificationConfigView.js | 6 -- 1 file changed, 6 deletions(-) diff --git

[pve-devel] [PATCH v2 proxmox-perl-rs 16/52] notify: adapt to new matcher-based notification routing

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 167 +-- 1 file changed, 50 insertions(+), 117 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs index 9f44225..4fbd705 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs

[pve-devel] [PATCH v2 pve-manager 27/52] vzdump: adapt to new matcher based notification system

2023-11-14 Thread Lukas Wagner
To ease the migration from old-style mailto/mailnotification paramters for backup jobs, the code will add a ephemeral sendmail endpoint and a matcher. Signed-off-by: Lukas Wagner --- PVE/API2/VZDump.pm | 8 +--- PVE/VZDump.pm | 40 +++- 2 files

[pve-devel] [PATCH v2 pve-manager 32/52] ui: dc: config: show notification panel again

2023-11-14 Thread Lukas Wagner
Rework should be done now. Signed-off-by: Lukas Wagner --- www/manager6/dc/Config.js | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js index 0dea1c67..74a84e91 100644 --- a/www/manager6/dc/Config.js +++

[pve-devel] [PATCH v2 proxmox-perl-rs 18/52] pve-rs: notify: remove notify_context for PVE

2023-11-14 Thread Lukas Wagner
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 --- Notes: Changes v2 -> v3: - No changes pve-rs/Cargo.toml| 2 +- pve-rs/src/lib.rs| 7 ++-

[pve-devel] [PATCH v2 pve-cluster 21/52] notify: adapt to matcher based notification system

2023-11-14 Thread Lukas Wagner
This commit removes the target paramters from all notify calls. Also, the default 'mail-to-root' target is not added automatically any more - this target will be added by an dpkg hook in the future. Signed-off-by: Lukas Wagner --- src/PVE/Notify.pm | 101

[pve-devel] [PATCH v2 proxmox-perl-rs 17/52] notify: add bindings for smtp API calls

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 106 +++ 1 file changed, 106 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index 4fbd705..8a6d76e 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs @@ -15,6 +15,10

[pve-devel] [PATCH v2 proxmox-perl-rs 19/52] notify: add 'disable' parameter

2023-11-14 Thread Lukas Wagner
This parameter disables a matcher/a target. Signed-off-by: Lukas Wagner --- common/src/notify.rs | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs index 8a6d76e..a5ab754 100644 --- a/common/src/notify.rs +++

[pve-devel] [PATCH v2 pve-guest-common 22/52] vzdump: deprecate mailto/mailnotification/notification-{target, policy}

2023-11-14 Thread Lukas Wagner
The first two will be migrated to the notification system, the second were part for the first attempt for the new notification system. The first attempt only ever hit pvetest, so we simply tell the user to not use the two params. Signed-off-by: Lukas Wagner --- src/PVE/VZDump/Common.pm | 16

[pve-devel] [PATCH v2 proxmox-widget-toolkit 43/52] panel: notification: add gui for SMTP endpoints

2023-11-14 Thread Lukas Wagner
This new endpoint configuration panel is embedded in the existing EndpointEditBase dialog window. This commit also factors out some of the non-trivial common form elements that are shared between the new panel and the already existing SendmailEditPanel into a separate panel EmailRecipientPanel.

[pve-devel] [PATCH v2 proxmox 07/52] notify: matcher: introduce common trait for match directives

2023-11-14 Thread Lukas Wagner
This allows us to make the match-checking code a bit shorter. Signed-off-by: Lukas Wagner --- proxmox-notify/src/matcher.rs | 92 +-- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/proxmox-notify/src/matcher.rs b/proxmox-notify/src/matcher.rs

[pve-devel] [PATCH v2 proxmox-perl-rs 20/52] notify: support 'origin' paramter

2023-11-14 Thread Lukas Wagner
This parameter shows the origin of a config entry (builtin, user-created, modified-builtin) Signed-off-by: Lukas Wagner --- common/src/notify.rs | 5 + 1 file changed, 5 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index a5ab754..8f9f38f 100644 ---

[pve-devel] [PATCH v2 proxmox 09/52] sys: email: add `forward`

2023-11-14 Thread Lukas Wagner
This new function forwards an email to new recipients. Signed-off-by: Lukas Wagner --- proxmox-sys/src/email.rs | 52 +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/proxmox-sys/src/email.rs b/proxmox-sys/src/email.rs index 8b3a1b6..c94f634

[pve-devel] [PATCH v2 debcargo-conf 02/52] update lettre to 0.11.1

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/lettre/debian/changelog | 10 +++ .../debian/patches/downgrade_fastrand.patch | 13 .../debian/patches/downgrade_idna.patch | 13 src/lettre/debian/patches/downgrade_url.patch | 13

[pve-devel] [PATCH v2 proxmox 13/52] notify: add api for smtp endpoints

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs| 33 +++ proxmox-notify/src/api/smtp.rs | 356 +++ proxmox-notify/src/endpoints/smtp.rs | 8 - 3 files changed, 389 insertions(+), 8 deletions(-) create mode 100644

[pve-devel] [PATCH v2 pve-manager 34/52] api: notification: add disable and origin params

2023-11-14 Thread Lukas Wagner
'disable' can be set to disable a matcher/target. 'origin' signals whether the configuration entry was created by the user or whether it was built-in/ built-in-and-modified. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 113 ++ 1 file changed,

[pve-devel] [PATCH v2 pve-manager 31/52] ui: vzdump: remove left-overs from target/policy based notifications

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/dc/Backup.js | 81 --- .../form/NotificationPolicySelector.js| 1 - www/manager6/window/Backup.js | 35 +--- 3 files changed, 15 insertions(+), 102 deletions(-) diff --git

[pve-devel] [PATCH v2 proxmox-widget-toolkit 39/52] notification ui: rename filter to matcher

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile | 2 +- src/data/model/NotificationConfig.js | 2 +- src/panel/NotificationConfigView.js | 26 +-- ...lterEdit.js => NotificationMatcherEdit.js} | 14 +- 4 files changed, 22

[pve-devel] [PATCH v2 proxmox 14/52] notify: add 'disable' parameter for matchers and targets.

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/gotify.rs | 8 +++- proxmox-notify/src/api/matcher.rs| 6 ++ proxmox-notify/src/api/sendmail.rs | 8 proxmox-notify/src/api/smtp.rs | 6 ++ proxmox-notify/src/endpoints/gotify.rs |

[pve-devel] [PATCH v2 pve-manager 24/52] api: notification: remove notification groups

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 267 +- 1 file changed, 4 insertions(+), 263 deletions(-) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index ec666903..b34802c8 100644 ---

[pve-devel] [PATCH v2 proxmox-widget-toolkit 36/52] notification ui: add target selector for matcher

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/window/NotificationFilterEdit.js | 145 +++ 1 file changed, 145 insertions(+) diff --git a/src/window/NotificationFilterEdit.js b/src/window/NotificationFilterEdit.js index 703a9e2..bcde4fa 100644 ---

[pve-devel] [PATCH v2 debcargo-conf 01/52] cherry-pick chumsky 0.9.2 from debian unstable

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/chumsky/debian/changelog | 5 +++ src/chumsky/debian/copyright | 39 + src/chumsky/debian/copyright.debcargo.hint | 51 ++ src/chumsky/debian/debcargo.toml | 2 + 4 files changed, 97

[pve-devel] [PATCH v2 pve-manager 28/52] api: apt: adapt to matcher-based notifications

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/APT.pm | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/PVE/API2/APT.pm b/PVE/API2/APT.pm index a213fc59..da75a4dc 100644 --- a/PVE/API2/APT.pm +++ b/PVE/API2/APT.pm @@ -286,8 +286,6 @@

  1   2   >