[pve-devel] applied: [PATCH widget-toolkit 1/1] combogrid: initialze value with [] by default

2023-11-14 Thread Thomas Lamprecht
Am 19/07/2023 um 14:11 schrieb Dominik Csapak: > we have to initialize the value of a combogrid to something (else extjs > does not initialize everything in the object *sometimes* for yet unknown > reasons), but the empty string is wrong. > > we already have at least two places where we set the de

[pve-devel] applied-series: [PATCH pve-manager/pmg-api/proxmox-backup/pwt 0/4] APT changelog switch-over

2023-11-14 Thread Thomas Lamprecht
Am 04/07/2023 um 11:45 schrieb Fabian Grünbichler: > this series switches all apt changelog fetching to `apt changelog`, > dropping our own custom logic in turn. > > (opted to send the whole series to pve-devel to avoid noise, obviously the > PMG/PBS patches are for PMG/PBS ;)) now pushed the API

Re: [pve-devel] [PATCH docs 1/2] pci passthrough: mention incompatibility with ballooning

2023-11-14 Thread Fiona Ebner
Am 13.11.23 um 18:09 schrieb Friedrich Weber: > > +xref:qm_ballooning[Automatic memory allocation (ballooning)] is not possible > +when using PCI(e) passthrough. As the PCI device may use DMA (Direct Memory > +Access), QEMU needs to map the complete guest memory on VM startup. Hence, > the > +QE

Re: [pve-devel] [PATCH qemu-server 2/2] vm start: warn if using ballooning and PCI(e) passthrough

2023-11-14 Thread Fiona Ebner
Am 13.11.23 um 18:09 schrieb Friedrich Weber: > diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm > index dbcd568..70983a4 100644 > --- a/PVE/QemuServer.pm > +++ b/PVE/QemuServer.pm > @@ -5789,6 +5789,16 @@ sub vm_start_nolock { > die $err; > } > > +if ( > + scalar(%$pci_devic

[pve-devel] [PATCH qemu-server/novnc/manager/docs v14 0/6] Feature VNC-Clipboard

2023-11-14 Thread Markus Frank
overall changes v11: * renamed vnc-clipboard to clipboard and changed it to a string overall changes v9: * renamed vnc_clipboard to vnc-clipboard qemu-server: changes v14: * removed trailing spaces changes v10: * separated "vnc-clipboard return at status/current" to its own patch * added missi

[pve-devel] [PATCH qemu-server v14 2/6] add clipboard variable to return at status/current

2023-11-14 Thread Markus Frank
By that noVNC is able to check if clipboard is active. Reviewed-by: Dominik Csapak Tested-by: Dominik Csapak Signed-off-by: Markus Frank --- PVE/API2/Qemu.pm | 8 1 file changed, 8 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 0177489..2bca07f 100644 --- a/PVE/

[pve-devel] [PATCH novnc v14 4/6] add "show clipboard button" patch to series

2023-11-14 Thread Markus Frank
Reviewed-by: Dominik Csapak Tested-by: Dominik Csapak Signed-off-by: Markus Frank --- .../patches/0019-show-clipboard-button.patch | 30 +++ debian/patches/series | 1 + 2 files changed, 31 insertions(+) create mode 100644 debian/patches/0019-show-clip

[pve-devel] [PATCH qemu-server v14 1/6] enable VNC clipboard parameter in vga_fmt

2023-11-14 Thread Markus Frank
add option to use the qemu vdagent implementation to enable the VNC clipboard. When enabled with SPICE the spice-vdagent gets replaced with the QEMU implementation. This patch does not solve #1406, but does allow copy and paste with a running X-session, when spice-vdagent is installed on the guest

[pve-devel] [PATCH qemu-server v14 3/6] test cases for clipboard spice & std

2023-11-14 Thread Markus Frank
add one test case for a spice display and one for std Reviewed-by: Dominik Csapak Tested-by: Dominik Csapak Signed-off-by: Markus Frank --- test/cfg2cmd/VNC-clipboard-spice.conf | 1 + test/cfg2cmd/VNC-clipboard-spice.conf.cmd | 27 +++ test/cfg2cmd/VNC-clipboard-std.c

[pve-devel] [PATCH docs v14 6/6] add VNC clipboard documentation

2023-11-14 Thread Markus Frank
Reviewed-by: Dominik Csapak Tested-by: Dominik Csapak Signed-off-by: Markus Frank --- qm.adoc | 18 ++ 1 file changed, 18 insertions(+) diff --git a/qm.adoc b/qm.adoc index 55a4728..cd0d907 100644 --- a/qm.adoc +++ b/qm.adoc @@ -817,6 +817,24 @@ Selecting `serialX` as display

[pve-devel] [PATCH manager v14 5/6] add clipboard checkbox to VM Options

2023-11-14 Thread Markus Frank
Signed-off-by: Markus Frank --- www/manager6/qemu/DisplayEdit.js | 8 www/manager6/qemu/Options.js | 82 2 files changed, 90 insertions(+) diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js index 9bb1763e..d7cd51a9 100644 -

Re: [pve-devel] [PATCH docs 1/2] pci passthrough: mention incompatibility with ballooning

2023-11-14 Thread Friedrich Weber
On 14/11/2023 09:30, Fiona Ebner wrote: > Am 13.11.23 um 18:09 schrieb Friedrich Weber: >> >> +xref:qm_ballooning[Automatic memory allocation (ballooning)] is not possible >> +when using PCI(e) passthrough. As the PCI device may use DMA (Direct Memory >> +Access), QEMU needs to map the complete g

Re: [pve-devel] [PATCH qemu-server 2/2] vm start: warn if using ballooning and PCI(e) passthrough

2023-11-14 Thread Friedrich Weber
Thanks for the review! I'll send a v2. On 14/11/2023 10:13, Fiona Ebner wrote: > Am 13.11.23 um 18:09 schrieb Friedrich Weber: >> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm >> index dbcd568..70983a4 100644 >> --- a/PVE/QemuServer.pm >> +++ b/PVE/QemuServer.pm >> @@ -5789,6 +5789,16 @@ sub

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

2023-11-14 Thread Dominik Csapak
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 for the specific type will be checked (and handles as 'additionalProperties' if there is no matching type

[pve-devel] [PATCH common/widget-toolkit] implement oneOf schema

2023-11-14 Thread Dominik Csapak
this series implementes the oneOf schema for the api, see the individual patches for more details pve-common: Dominik Csapak (4): section config: add test for the schemas json schema: implement 'oneOf' schema section config: allow separated property lists for plugins section config: add t

[pve-devel] [PATCH common 1/4] section config: add test for the schemas

2023-11-14 Thread Dominik Csapak
by simply doing an 'is_deeply' on the generated schema with the current generated schema Signed-off-by: Dominik Csapak --- test/section_config_test.pl | 133 1 file changed, 133 insertions(+) diff --git a/test/section_config_test.pl b/test/section_config_tes

[pve-devel] [PATCH widget-toolkit 1/1] api-viewer: implement basic oneOf support

2023-11-14 Thread Dominik Csapak
for parameters only for now, also only implement the basic use case we want to have currently: use in section config apis where we have more than one type. we could improve upon that, e.g. by properly grouping the type relevant options, and also implementing that for return types. Signed-off-by:

[pve-devel] [PATCH common 4/4] section config: add tests for separated property lists

2023-11-14 Thread Dominik Csapak
more or less a copy from the normal section config test, but now with properties defined multiple times as well as conflicting options Signed-off-by: Dominik Csapak --- test/Makefile | 1 + test/section_config_separated_test.pl | 486 ++ 2 files

[pve-devel] [PATCH common 3/4] section config: allow separated property lists for plugins

2023-11-14 Thread Dominik Csapak
when using 'init(1)'. This saves the property lists per type instead of a big one, and using create/updateSchema creates a new schema with the options as 'oneOf' and/or 'instance-types' (depending if the schemas match). for that to work there are a few changes in how to use the 'options' hash: * w

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

2023-11-14 Thread 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. UI is still to follow, depends on [0] for the oneOf schema support. changes from rfc/v1: * uses a section config with separated plugins, using the on

[pve-devel] [PATCH container v2 1/3] add the CT profiles plugin

2023-11-14 Thread Dominik Csapak
simply uses the json_config_properties for the ct config Signed-off-by: Dominik Csapak --- changes from v1: * no prefixing with ct_ anymore src/PVE/Makefile | 1 + src/PVE/Profiles/CT.pm| 28 src/PVE/Profiles/Makefile | 4 3 files changed, 33 ins

[pve-devel] [PATCH cluster v2 1/1] add profiles.cfg to cluster fs

2023-11-14 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- src/PVE/Cluster.pm | 1 + src/pmxcfs/status.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/PVE/Cluster.pm b/src/PVE/Cluster.pm index cfa2583..c01bf89 100644 --- a/src/PVE/Cluster.pm +++ b/src/PVE/Cluster.pm @@ -80,6 +80,7 @@ my $observed = { 's

[pve-devel] [PATCH qemu-server v2 1/3] add the VM profiles plugin

2023-11-14 Thread Dominik Csapak
simply uses the json_config_properties for the vm config Signed-off-by: Dominik Csapak --- changes from v1: * no prefixing with vm anymore PVE/Makefile | 1 + PVE/Profiles/Makefile | 5 + PVE/Profiles/VM.pm| 28 3 files changed, 34 insertions(+)

[pve-devel] [PATCH qemu-server v2 2/3] api: add profile option to create vm api call

2023-11-14 Thread Dominik Csapak
we use the the profile cfg as the 'param' hash, but overwrite the values with the ones from the api call, so one can overwrite options from the profile easily also we add the used profile to the log, since it might be interesting which one was used Signed-off-by: Dominik Csapak --- changes from

[pve-devel] [PATCH qemu-server v2 3/3] qm: register and init the profiles plugins

2023-11-14 Thread Dominik Csapak
we have to that here, so the properties/options are correctly configured when using that feature on the cli Signed-off-by: Dominik Csapak --- changes from v1: * use init(1) for separated plugin schemas PVE/CLI/qm.pm | 6 ++ 1 file changed, 6 insertions(+) diff --git a/PVE/CLI/qm.pm b/PVE/CL

[pve-devel] [PATCH guest-common v2 1/1] add profiles section config plugin

2023-11-14 Thread Dominik Csapak
this is intended to house custom profiles which can be used on guest creation instead of manually needing to specify every option. we do special things here: * we always set 'allow_unknown' to 1, because when using the guest specific parts in the cli, we cannot depend on the other one, else we

[pve-devel] [PATCH container v2 3/3] pct: register and init the profiles plugins

2023-11-14 Thread Dominik Csapak
we have to that here, so the properties/options are correctly configured when using that feature on the cli Signed-off-by: Dominik Csapak --- changes from v1: * use init(1) for separated plugins src/PVE/CLI/pct.pm | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/PVE/CLI/pct.pm b/src

[pve-devel] [PATCH container v2 2/3] api: add profile option to create ct api call

2023-11-14 Thread Dominik Csapak
we use the profile cfg as the 'param' hash, but overwrite the values with the ones from the api call, so one can overwrite options from the profile easily we also log the used profile Signed-off-by: Dominik Csapak --- changes from v1: * use helper from Plugin * log profile when used * use /mappi

[pve-devel] [PATCH manager v2 1/1] api: add guest profile api endpoint

2023-11-14 Thread Dominik Csapak
basic CRUD for the profile section config Signed-off-by: Dominik Csapak --- changes from v1: * use raise_param_exc when id or type is wrong * extract the type from param * use /mapping/guest-profile as acl path * add missing index entry for profiles PVE/API2/Cluster.pm | 7 ++ PVE/AP

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

2023-11-14 Thread 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 ...N-array-index-out-of-bounds-for-Pola.patch | 76 +++

Re: [pve-devel] [PATCH guest-common v2 1/1] add profiles section config plugin

2023-11-14 Thread Thomas Lamprecht
Am 14/11/2023 um 11:35 schrieb Dominik Csapak: > this is intended to house custom profiles which can be used > on guest creation instead of manually needing to specify every option. > > we do special things here: > * we always set 'allow_unknown' to 1, because when using the guest > specific par

Re: [pve-devel] applied: [PATCH v4 common 2/2] tools: Add mount flag constants

2023-11-14 Thread Wolfgang Bumiller
On Mon, Nov 13, 2023 at 03:14:47PM +0100, Thomas Lamprecht wrote: > Am 13/11/2023 um 11:30 schrieb Filip Schauer: > > Signed-off-by: Filip Schauer > > --- > > src/PVE/Tools.pm | 31 +++ > > 1 file changed, 31 insertions(+) > > > > > > applied this one already too, th

[pve-devel] [PATCH v2 proxmox 03/52] notify: introduce Error::Generic

2023-11-14 Thread Lukas Wagner
... as leaf error-type for anything for which we do not necessarily want a separate enum variant. Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 11 +++ 1 file changed, 11 insertions(+) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 7500778..f7d480

[pve-devel] [PATCH v2 proxmox 08/52] notify: let a matcher always match if it has no matching directives

2023-11-14 Thread Lukas Wagner
This should be a bit more intuitive to users than the current behavior, which is 'always match' for mode==all and 'never match' for mode==any. The current behavior originates in the neutral element of the underlying logical operation (and, or). Signed-off-by: Lukas Wagner --- proxmox-notify/src/

[pve-devel] [PATCH v2 proxmox 06/52] notify: add calendar matcher

2023-11-14 Thread Lukas Wagner
This allows matching by a notification's timestamp: matcher: foo match-calendar mon..fri 8-12 Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/matcher.rs | 6 +++ proxmox-notify/src/lib.rs | 4 ++ proxmox-notify/src/matcher.rs | 65 +++ 3 files

[pve-devel] [PATCH v2 proxmox 10/52] notify: add mechanisms for email message forwarding

2023-11-14 Thread Lukas Wagner
As preparation for the integration of `proxmox-mail-foward` into the notification system, this commit makes a few changes that allow us to forward raw email messages (as passed from postfix). For mail-based notification targets, the email will be forwarded as-is, including all headers. The only th

[pve-devel] [PATCH v2 proxmox 04/52] notify: factor out notification content into its own type

2023-11-14 Thread Lukas Wagner
This will be useful later for system mail forwarding, where the content of the mail should be forwarded unchanged. This moves notification properties into this new type and calls them 'data'. They will exclusively used for template rendering. `Notification` will receive a separate field for metada

[pve-devel] [PATCH v2 pve-ha-manager 23/52] env: switch to matcher-based notification system

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/PVE/HA/Env/PVE2.pm | 10 ++ src/PVE/HA/NodeStatus.pm | 11 +-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE/HA/Env/PVE2.pm index ea9e6e4..fcb60a9 100644 --- a/src/PVE/HA/Env/PVE2.pm +++ b/sr

[pve-devel] [PATCH v2 many 00/52] revamp notifications; smtp endpoints; system mail

2023-11-14 Thread Lukas Wagner
Note: For simplicity, the series merges the three series' into one large one. Otherwise the cross-deps would have been really messy to manage on the list. ## Notification revamp: This series replaces notification filters and groups with notification matchers. Instead of having a per-notification

[pve-devel] [PATCH v2 pve-manager 30/52] test: fix vzdump notification test

2023-11-14 Thread Lukas Wagner
The signature of the PVE::Notify functions have changed, this commit adapts the mocked functions so that the tests work again. Signed-off-by: Lukas Wagner --- test/vzdump_notification_test.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/vzdump_notification_test.

[pve-devel] [PATCH v2 pve-manager 29/52] api: replication: adapt to matcher-based notification system

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Replication.pm | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm index d61518ba..0dc944c9 100644 --- a/PVE/API2/Replication.pm +++ b/PVE/API2/Replication.pm @@

[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 @@ __PACKAGE__->register

[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 in

[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 --- a/src/window/NotificationFilterEdi

[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 --- a/PVE/API2/Cluster/Not

[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 | 9

[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 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 a/www/manager6

[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, 99

[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 proxmox-notify/src/api/smtp.

[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 .../patches/remove_unused_features.pat

[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 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 --- a/common/src/not

[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 inde

[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. Si

[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-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 +++ b/

[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 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 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-rs/src/notif

[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 +++ b/www/man

[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 chang

[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 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 a/src/panel/Noti

[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(-) d

[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 b/debi

[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' button

[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 n

[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 --- a

[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 e8ed51b.

[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 +- www/manager6/dc/N

[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 i

[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 a

[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-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 | 2

[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 subj

[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 @@ accomoda

[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 mode

[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 bind

[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 code

[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 will

[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 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 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 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

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 ar

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 for

[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.

[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 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 por

[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 cou

[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, tos_agree

[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 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. Signed-off-by:

[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 b

[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 @@ __PACKAGE

[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/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 imp

[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. Signed-off-b

[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 +++--- src/bin/proxmox_backup_manager/acme

  1   2   >