Re: [pve-devel] [PATCH v3 proxmox 02/66] notify: preparation for the first endpoint plugin

2023-07-17 Thread Maximiliano Sandoval
Lukas Wagner writes: > Signed-off-by: Lukas Wagner > --- > Cargo.toml | 1 + > proxmox-notify/Cargo.toml | 9 + > proxmox-notify/src/config.rs| 51 + > proxmox-notify/src/endpoints/mod.rs | 0 > proxmox-notify/src/lib.rs | 311 +++

[pve-devel] [PATCH v3 pve-manager 51/66] api: notification: allow fetching notification targets

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 100 ++ 1 file changed, 100 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index e358573c..32a873a7 100644 --- a/PVE/API2/Cluster/Notifications.pm ++

[pve-devel] [PATCH v3 pve-manager 48/66] api: notification: add api routes for sendmail endpoints

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 315 ++ 1 file changed, 315 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index b1971911..aea571f0 100644 --- a/PVE/API2/Cluster/Notifications.pm ++

[pve-devel] [PATCH v3 proxmox 11/66] notify: add notification filter mechanism

2023-07-17 Thread Lukas Wagner
This commit adds a way to filter notifications based on severity. The filter module also has the necessary foundation work for more complex filters, e.g. matching on properties or for creating arbitarily complex filter structures using nested sub-filters. Signed-off-by: Lukas Wagner --- proxmox-

[pve-devel] [PATCH v3 pve-manager 42/66] vzdump: send notifications via new notification module

2023-07-17 Thread Lukas Wagner
... instead of using sendmail directly. If the new 'notification-target' parameter is set, we send the notification to this endpoint or group. If 'mailto' is set, we add a temporary endpoint and a temporary group containg both targets. This commit also refactors the old 'sendmail' sub heavily:

[pve-devel] [PATCH v3 proxmox 23/66] notify: add debian packaging

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/debian/changelog | 5 ++ proxmox-notify/debian/control | 108 proxmox-notify/debian/copyright | 16 + proxmox-notify/debian/debcargo.toml | 7 ++ 4 files changed, 136 insertions(+) create mode 1006

[pve-devel] [PATCH v3 pve-manager 55/66] ui: backup: adapt backup job details to new notification params

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/dc/BackupJobDetail.js | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/www/manager6/dc/BackupJobDetail.js b/www/manager6/dc/BackupJobDetail.js index c4683a47..8b9bb749 100644 --- a/www/manager6/dc/BackupJobDeta

[pve-devel] [PATCH v3 pve-manager 43/66] test: rename mail_test.pl to vzdump_notification_test.pl

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- test/Makefile | 8 test/{mail_test.pl => vzdump_notification_test.pl} | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename test/{mail_test.pl => vzdump_notification_test.pl} (100%) diff --git a/test/Makefile b

[pve-devel] [PATCH v3 proxmox 21/66] notify: ensure that filter/group/endpoint names are unique

2023-07-17 Thread Lukas Wagner
Otherwise, a filter with the same name as an already existing endpoint or group can overwrite it. Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/filter.rs | 7 + proxmox-notify/src/api/gotify.rs | 10 +-- proxmox-notify/src/api/group.rs| 24 ++- proxmox-notif

[pve-devel] [PATCH v3 proxmox 20/66] notify: on deletion, check if a filter/endp. is still used by anything

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/filter.rs | 1 + proxmox-notify/src/api/gotify.rs | 1 + proxmox-notify/src/api/mod.rs | 113 ++--- proxmox-notify/src/api/sendmail.rs | 1 + 4 files changed, 106 insertions(+), 10 deletions(-) diff --g

[pve-devel] [PATCH v3 proxmox-widget-toolkit 63/66] notification: add gui for notification groups

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile| 1 + src/Schema.js | 5 + src/panel/NotificationGroupEditPanel.js | 177 src/window/EndpointEditBase.js | 6 +- 4 files changed, 188 insertions(+), 1 deletio

[pve-devel] [PATCH v3 pve-manager 52/66] api: notification: allow to test targets

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 40 +++ 1 file changed, 40 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index 32a873a7..fa2c1d9d 100644 --- a/PVE/API2/Cluster/Notifications.pm +++

[pve-devel] [PATCH v3 proxmox-perl-rs 27/66] notify: add api for sendmail endpoints

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/notify.rs | 88 1 file changed, 88 insertions(+) diff --git a/pve-rs/src/notify.rs b/pve-rs/src/notify.rs index cac233a..9490ea8 100644 --- a/pve-rs/src/notify.rs +++ b/pve-rs/src/notify.rs @@ -5,6 +5,9 @@ mo

[pve-devel] [PATCH v3 pve-manager 59/66] ui: perm path: load notification target/filter acl entries

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: I'm not sure if I like this solution, but adding notification targets to the resources API endpoint would not have make sense. Maybe we could create a new API endpoint that returns all possible ACL paths and then use a normal store for the pe

[pve-devel] [PATCH v3 pve-manager 53/66] api: notification: disallow removing targets if they are used

2023-07-17 Thread Lukas Wagner
Check notification targets configured in datacenter.cfg and jobs.cfg, failing if the group/endpoint to be removed is still in use there. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 44 ++- 1 file changed, 43 insertions(+), 1 deletion(-) diff -

[pve-devel] [PATCH v3 proxmox-perl-rs 33/66] notify: add wrapper for `get_referenced_entities`

2023-07-17 Thread Lukas Wagner
The function returns all other entities referenced by a filter/target. This is useful for permission checks, where the user must have the appropriate permissions for all entities. Signed-off-by: Lukas Wagner --- pve-rs/src/notify.rs | 9 + 1 file changed, 9 insertions(+) diff --git a/pv

[pve-devel] [PATCH v3 proxmox-perl-rs 29/66] notify: add api for notification filters

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/notify.rs | 83 1 file changed, 83 insertions(+) diff --git a/pve-rs/src/notify.rs b/pve-rs/src/notify.rs index aa2c312..a6143fc 100644 --- a/pve-rs/src/notify.rs +++ b/pve-rs/src/notify.rs @@ -12,6 +12,9 @@

[pve-devel] [PATCH v3 pve-manager 50/66] api: notification: add api routes for filters

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 263 ++ 1 file changed, 263 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index 8f0b6429..e358573c 100644 --- a/PVE/API2/Cluster/Notifications.pm ++

[pve-devel] [PATCH v3 pve-cluster 34/66] cluster files: add notifications.cfg

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/PVE/Cluster.pm | 2 ++ src/pmxcfs/status.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/PVE/Cluster.pm b/src/PVE/Cluster.pm index c310a67..e3705b6 100644 --- a/src/PVE/Cluster.pm +++ b/src/PVE/Cluster.pm @@ -55,6 +55,8 @@ my $observed = { 'f

[pve-devel] [PATCH v3 proxmox-perl-rs 32/66] notify: add context for getting http_proxy from datacenter.cfg

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/notify.rs | 11 +++ 1 file changed, 11 insertions(+) diff --git a/pve-rs/src/notify.rs b/pve-rs/src/notify.rs index 04e902c..0c00b03 100644 --- a/pve-rs/src/notify.rs +++ b/pve-rs/src/notify.rs @@ -60,6 +60,11 @@ impl Context for PVEContext {

[pve-devel] [PATCH v3 proxmox-widget-toolkit 61/66] notification: add gui for sendmail notification endpoints

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile | 4 + src/Schema.js| 8 ++ src/data/model/NotificationConfig.js | 8 ++ src/panel/NotificationConfigView.js | 192 +++ src/panel/SendmailEditPanel.js | 140 ++

[pve-devel] [PATCH v3 proxmox 13/66] notify: add template rendering

2023-07-17 Thread Lukas Wagner
This commit adds template rendering to the `proxmox-notify` crate, based on the `handlebars` crate. Title and body of a notification are rendered using any `properties` passed along with the notification. There are also a few helpers, allowing to render tables from `serde_json::Value`. 'Value' re

[pve-devel] [PATCH v3 pve-docs 66/66] add documentation for the new notification system

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 159 +++ pve-admin-guide.adoc | 2 + pve-gui.adoc | 2 + vzdump.adoc | 5 ++ 4 files changed, 168 insertions(+) create mode 100644 notifications.adoc diff --git a/notifications.

[pve-devel] [PATCH v3 pve-manager 54/66] ui: backup: allow to select notification target for jobs

2023-07-17 Thread Lukas Wagner
This commit adds a possibility to choose between different options for notifications for backup jobs: - Notify via email, in the same manner as before - Notify via an endpoint/group If 'notify via mail' is selected, a text field where an email address can be entered is displayed: Noti

[pve-devel] [PATCH v3 proxmox-widget-toolkit 65/66] notification: add ui for managing notification filters

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile | 3 +- src/data/model/NotificationConfig.js | 9 ++ src/panel/NotificationConfigView.js | 119 +++ src/window/NotificationFilterEdit.js | 115 ++ 4 files changed, 245 inserti

[pve-devel] [PATCH v3 proxmox-widget-toolkit 64/66] notification: allow to select filter for notification targets

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile| 1 + src/form/NotificationFilterSelector.js | 58 + src/panel/GotifyEditPanel.js| 9 src/panel/NotificationConfigView.js | 4 ++ src/panel/NotificationGroupEditPanel.js | 9

[pve-devel] [PATCH v3 pve-manager 49/66] api: notification: add api routes for gotify endpoints

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 271 ++ 1 file changed, 271 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index aea571f0..8f0b6429 100644 --- a/PVE/API2/Cluster/Notifications.pm ++

[pve-devel] [PATCH v3 pve-ha-manager 39/66] manager: send notifications via new notification module

2023-07-17 Thread Lukas Wagner
... instead of using sendmail directly. If the new 'notify.target-fencing' parameter from datacenter config is set, we use it as a target for notifications. If it is not set, we send the notification to the default target (mail-to-root). There is also a new 'notify.fencing' paramter which control

[pve-devel] [PATCH v3 proxmox-widget-toolkit 62/66] notification: add gui for gotify notification endpoints

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile | 1 + src/Schema.js| 5 src/panel/GotifyEditPanel.js | 52 3 files changed, 58 insertions(+) create mode 100644 src/panel/GotifyEditPanel.js diff --git a/src/Makefile b/src/

[pve-devel] [PATCH v3 pve-cluster 36/66] add libpve-notify-perl package

2023-07-17 Thread Lukas Wagner
The package contains the PVE::Notify. It is a very thin wrapper around the Proxmox::RS::Notify module, feeding the configuration from the new 'notifications.cfg' and 'priv/notifications.cfg' files into it. Signed-off-by: Lukas Wagner --- debian/control| 9 ++ debian/libpve

[pve-devel] [PATCH v3 pve-manager 44/66] api: apt: send notification via new notification module

2023-07-17 Thread Lukas Wagner
... instead of using sendmail directly If the new 'target-package-updates' is set, we send a notification to this target. If not, we continue to send a mail to root@pam (if the mail address is configured) Signed-off-by: Lukas Wagner --- PVE/API2/APT.pm | 99 ++---

[pve-devel] [PATCH v3 many 00/66] fix #4156: introduce new notification system

2023-07-17 Thread Lukas Wagner
# Overview The purpose of this patch series is to overhaul the existing mail notification infrastructure in Proxmox VE. The series replaces calls to 'sendmail' with calls to a new, configurable notification module. The module was designed to support multiple notification endpoints, 'sendmail' usin

[pve-devel] [PATCH v3 pve-manager 46/66] api: prepare api handler module for notification config

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster.pm | 7 +++ PVE/API2/Cluster/Makefile | 1 + PVE/API2/Cluster/Notifications.pm | 71 +++ 3 files changed, 79 insertions(+) create mode 100644 PVE/API2/Cluster/Notifications.pm diff --git a/PVE/A

[pve-devel] [PATCH v3 pve-manager 56/66] ui: backup: allow to set notification-target for one-off backups

2023-07-17 Thread Lukas Wagner
In essence the same change as for backup jobs. Signed-off-by: Lukas Wagner --- www/manager6/window/Backup.js | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js index 4b21c746..17a37

[pve-devel] [PATCH v3 pve-manager 45/66] api: replication: send notifications via new notification module

2023-07-17 Thread Lukas Wagner
If the new 'target-replication' option in datacenter.cfg is set to a notification target, we send notifications that way. If it is not set, we continue send a notification to the default target (mail to root@pam). There is also a new 'replication' option. It controls whether to send a notification

[pve-devel] [PATCH v3 pve-cluster 35/66] datacenter: add APT/fencing/replication notification configuration

2023-07-17 Thread Lukas Wagner
These options allow setting the notification target for package update notifications, node fencing notifications and replication notifications. Also, fencing and replication has now new options that allow disabling notifications altogether. Signed-off-by: Lukas Wagner --- src/PVE/DataCenterConf

[pve-devel] [PATCH v3 pve-manager 58/66] ui: add notification target configuration panel

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/dc/Config.js | 16 1 file changed, 16 insertions(+) diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js index aa025c8d..9ba7b301 100644 --- a/www/manager6/dc/Config.js +++ b/www/manager6/dc/Config.js @@ -329,6 +329,22 @

[pve-devel] [PATCH v3 pve-guest-common 37/66] vzdump: add config options for new notification backend

2023-07-17 Thread Lukas Wagner
- Add new option 'notification-target' Allows to select to which endpoint/group notifications shall be sent - Add new option 'notification-policy' Replacement for the now deprecated 'mailnotification' option. Mostly just a rename for consistency, but also adds the 'never' option. - Mark 'mail

[pve-devel] [PATCH v3 pve-manager 41/66] d/control: add dependency to `libpve-notify-perl`

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: Did not add version number since I do not know which it will be yet. debian/control | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/control b/debian/control index 3206b514..b807dbfe 100644 --- a/debian/control +++ b/debian/control @@ -14,6

[pve-devel] [PATCH v3 proxmox 16/66] notify: sendmail: allow users as recipients

2023-07-17 Thread Lukas Wagner
This introduces a new configuration parameter `mailto-user`. A user's email address will be looked up in the product-specific user database. Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/sendmail.rs | 32 --- proxmox-notify/src/context.rs| 4 ++- proxm

[pve-devel] [PATCH v3 proxmox-perl-rs 31/66] notify: implement context for getting default author/mailfrom

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/notify.rs | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/pve-rs/src/notify.rs b/pve-rs/src/notify.rs index ea34bfe..04e902c 100644 --- a/pve-rs/src/notify.rs +++ b/pve-rs/src/notify.rs @@ -34,6 +34,1

[pve-devel] [PATCH v3 proxmox-perl-rs 24/66] add PVE::RS::Notify module

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/Cargo.toml| 1 + pve-rs/Makefile | 1 + pve-rs/src/lib.rs| 1 + pve-rs/src/notify.rs | 71 4 files changed, 74 insertions(+) create mode 100644 pve-rs/src/notify.rs diff --git a/pve-rs/Cargo.toml

[pve-devel] [PATCH v3 pve-manager 57/66] ui: allow to configure notification event -> target mapping

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/Makefile | 1 + www/manager6/dc/Config.js | 12 ++ www/manager6/dc/NotificationEvents.js | 238 ++ 3 files changed, 251 insertions(+) create mode 100644 www/manager6/dc/NotificationEvents.js diff

[pve-devel] [PATCH v3 proxmox 08/66] notify: api: add API for gotify endpoints

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/gotify.rs | 284 +++ proxmox-notify/src/api/mod.rs| 6 + 2 files changed, 290 insertions(+) create mode 100644 proxmox-notify/src/api/gotify.rs diff --git a/proxmox-notify/src/api/gotify.rs b/proxmox-notify

[pve-devel] [PATCH v3 proxmox 22/66] notify: additional logging when sending a notification

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 3c2b6d55..d2f15496 100644 --- a/proxmox-notify/src/lib.rs +++ b/proxmox-notify/src/lib.r

[pve-devel] [PATCH v3 pve-manager 47/66] api: notification: add api routes for groups

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 254 ++ 1 file changed, 254 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index 1efebbc1..b1971911 100644 --- a/PVE/API2/Cluster/Notifications.pm ++

[pve-devel] [PATCH v3 proxmox 17/66] notify: sendmail: query default author/mailfrom from context

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/context.rs| 2 ++ proxmox-notify/src/endpoints/sendmail.rs | 18 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/proxmox-notify/src/context.rs b/proxmox-notify/src/context.rs index 25be949a..8b55a2d

[pve-devel] [PATCH v3 proxmox 06/66] notify: api: add API for sendmail endpoints

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs | 7 + proxmox-notify/src/api/sendmail.rs | 254 + 2 files changed, 261 insertions(+) create mode 100644 proxmox-notify/src/api/sendmail.rs diff --git a/proxmox-notify/src/api/mod.rs b/proxmox-notif

[pve-devel] [PATCH v3 proxmox 03/66] notify: preparation for the API

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs | 94 +++ proxmox-notify/src/lib.rs | 1 + 2 files changed, 95 insertions(+) create mode 100644 proxmox-notify/src/api/mod.rs diff --git a/proxmox-notify/src/api/mod.rs b/proxmox-notify/src/api/mo

[pve-devel] [PATCH v3 pve-manager 60/66] ui: perm path: increase width of the perm path selector combobox

2023-07-17 Thread Lukas Wagner
ACL paths for notification targets can become quite long, e.g.: /mappings/notifications/ Signed-off-by: Lukas Wagner --- www/manager6/form/PermPathSelector.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/manager6/form/PermPathSelector.js b/www/manager6/form/PermPathSelector.js index

[pve-devel] [PATCH v3 pve-manager 40/66] test: fix names of .PHONY targets

2023-07-17 Thread Lukas Wagner
They need to have the same name as the target. Took the opportunity to move the .PHONY right next to the target recipe, so that mistakes like these are hopefully easier caught. Signed-off-by: Lukas Wagner --- test/Makefile | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --

[pve-devel] [PATCH v3 proxmox-perl-rs 30/66] notify: sendmail: support the `mailto-user` parameter

2023-07-17 Thread Lukas Wagner
This parameter allows to send mails to the email address configured for users from the product's user database. `proxmox-notify` now has a `Context` that must be set via `proxmox_notify::context::set_context` before the crate is used. Signed-off-by: Lukas Wagner --- pve-rs/Cargo.toml| 1 +

[pve-devel] [PATCH v3 pve-common 38/66] JSONSchema: increase maxLength of config-digest to 64

2023-07-17 Thread Lukas Wagner
The new notification backend is implemented in Rust where we use SHA256 for config digests. Signed-off-by: Lukas Wagner --- src/PVE/JSONSchema.pm | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index 7589bba..49e0d7a 100644

[pve-devel] [PATCH v3 proxmox 09/66] notify: add notification groups

2023-07-17 Thread Lukas Wagner
When notifying via a group, all endpoints contained in that group will send out the notification. Signed-off-by: Lukas Wagner --- proxmox-notify/src/config.rs | 9 ++ proxmox-notify/src/group.rs | 40 + proxmox-notify/src/lib.rs| 170 --- 3 files c

[pve-devel] [PATCH v3 proxmox 12/66] notify: api: add API for filters

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/filter.rs | 231 + proxmox-notify/src/api/gotify.rs | 12 ++ proxmox-notify/src/api/group.rs| 7 + proxmox-notify/src/api/mod.rs | 1 + proxmox-notify/src/api/sendmail.rs | 10 ++ 5 files changed

[pve-devel] [PATCH v3 proxmox-perl-rs 28/66] notify: add api for gotify endpoints

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/notify.rs | 83 1 file changed, 83 insertions(+) diff --git a/pve-rs/src/notify.rs b/pve-rs/src/notify.rs index 9490ea8..aa2c312 100644 --- a/pve-rs/src/notify.rs +++ b/pve-rs/src/notify.rs @@ -5,6 +5,10 @@ m

[pve-devel] [PATCH v3 proxmox 19/66] notify: api: allow to query entities referenced by filter/target

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/common.rs | 11 +++ proxmox-notify/src/api/mod.rs| 125 +++ 2 files changed, 136 insertions(+) diff --git a/proxmox-notify/src/api/common.rs b/proxmox-notify/src/api/common.rs index 518caa8f..48761fbb 100644

[pve-devel] [PATCH v3 proxmox-perl-rs 26/66] notify: add api for notification groups

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/notify.rs | 70 1 file changed, 70 insertions(+) diff --git a/pve-rs/src/notify.rs b/pve-rs/src/notify.rs index 74a872b..cac233a 100644 --- a/pve-rs/src/notify.rs +++ b/pve-rs/src/notify.rs @@ -5,6 +5,7 @@ mo

[pve-devel] [PATCH v3 proxmox 10/66] notify: api: add API for groups

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/group.rs | 264 proxmox-notify/src/api/mod.rs | 1 + 2 files changed, 265 insertions(+) create mode 100644 proxmox-notify/src/api/group.rs diff --git a/proxmox-notify/src/api/group.rs b/proxmox-notify/sr

[pve-devel] [PATCH v3 proxmox-perl-rs 25/66] notify: add api for sending notifications/testing endpoints

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/notify.rs | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/pve-rs/src/notify.rs b/pve-rs/src/notify.rs index 9677d8b..74a872b 100644 --- a/pve-rs/src/notify.rs +++ b/pve-rs/src/notify.rs @@ -2,10 +2,

[pve-devel] [PATCH v3 proxmox 18/66] notify: gotify: add proxy support

2023-07-17 Thread Lukas Wagner
The proxy configuration will be read from datacenter.cfg via a new method of the `Context` trait. Signed-off-by: Lukas Wagner --- proxmox-notify/src/context.rs | 1 + proxmox-notify/src/endpoints/gotify.rs | 22 -- 2 files changed, 17 insertions(+), 6 deletions(-)

[pve-devel] [PATCH v3 proxmox 02/66] notify: preparation for the first endpoint plugin

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Cargo.toml | 1 + proxmox-notify/Cargo.toml | 9 + proxmox-notify/src/config.rs| 51 + proxmox-notify/src/endpoints/mod.rs | 0 proxmox-notify/src/lib.rs | 311 proxmox-not

[pve-devel] [PATCH v3 proxmox 14/66] notify: add example for template rendering

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/examples/render.rs | 63 +++ 1 file changed, 63 insertions(+) create mode 100644 proxmox-notify/examples/render.rs diff --git a/proxmox-notify/examples/render.rs b/proxmox-notify/examples/render.rs new file mode 100644

[pve-devel] [PATCH v3 proxmox 15/66] notify: add context

2023-07-17 Thread Lukas Wagner
Since `proxmox-notify` is intended to be used by multiple products, there needs to be a way to inject product-specific behavior. Signed-off-by: Lukas Wagner --- proxmox-notify/src/context.rs | 13 + proxmox-notify/src/lib.rs | 1 + 2 files changed, 14 insertions(+) create mode

[pve-devel] [PATCH v3 proxmox 07/66] notify: add gotify endpoint

2023-07-17 Thread Lukas Wagner
Add an endpoint for Gotify [1], showing the how easy it is to add new endpoint implementations. [1] https://gotify.net/ Signed-off-by: Lukas Wagner --- proxmox-notify/Cargo.toml | 6 +- proxmox-notify/src/config.rs | 23 + proxmox-notify/src/endpoints/gotify.rs | 1

[pve-devel] [PATCH v3 proxmox 04/66] notify: api: add API for sending notifications/testing endpoints

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/common.rs | 44 proxmox-notify/src/api/mod.rs| 2 ++ 2 files changed, 46 insertions(+) create mode 100644 proxmox-notify/src/api/common.rs diff --git a/proxmox-notify/src/api/common.rs b/proxmox-notify/

[pve-devel] [PATCH v3 proxmox 05/66] notify: add sendmail plugin

2023-07-17 Thread Lukas Wagner
This plugin uses the 'sendmail' command to send an email to one or more recipients. Signed-off-by: Lukas Wagner --- proxmox-notify/Cargo.toml| 9 ++- proxmox-notify/src/config.rs | 12 proxmox-notify/src/endpoints/mod.rs | 2 + proxmox-notify/src/endpoints

[pve-devel] [PATCH v3 proxmox 01/66] add proxmox-notify crate

2023-07-17 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: Changes v1 -> v2: - Renamed crate from 'proxmox-notification' to 'proxmox-notify' Cargo.toml| 1 + proxmox-notify/Cargo.toml | 10 ++ proxmox-notify/src/lib.rs | 0 3 files changed, 11 insertions(+) create mode 100644

[pve-devel] applied: [PATCH docs 1/2] pveum: add missing roles and privileges

2023-07-17 Thread Thomas Lamprecht
Am 10/07/2023 um 17:10 schrieb Max Carrara: > Signed-off-by: Max Carrara > --- > pveum.adoc | 7 +++ > 1 file changed, 7 insertions(+) > > The grouping is a bit odd for a few points, like SDN.Use and Mapping.Use are roughly about the same thing, but one is at guest level the other at node l

[pve-devel] [PATCH-SERIES qemu-server] migration: nbd alloc: improve format fallback

2023-07-17 Thread Fiona Ebner
Currently, remote migration behaves a bit differently, because an explicitly passed-in format that is not supported by the target storage is not overwritten with the storage's default format. This meant remote live migration with qcow2 to e.g. LVM-thin would not work, because the code here wrongly

[pve-devel] [PATCH qemu-server 1/2] migration: alloc nbd disks: base format hint off source storage

2023-07-17 Thread Fiona Ebner
Previously, qemu_img_format() was called with the target storage's $scfg and the source storage's volume name. This mismatch should only be relevant for certain special kinds of storage plugins: - no path, but does support an additional QEMU image format besides 'raw', in short NPAF. - no path,

[pve-devel] [PATCH qemu-server 2/2] migration: alloc nbd disks: fix fall-back for remote live migration

2023-07-17 Thread Fiona Ebner
While the comment sated ># order of precedence, filtered by whether storage supports it: ># 1. explicit requested format ># 2. format of current volume ># 3. default format of storage the code did not fall back to the default format in the case of remote migration, because the form

Re: [pve-devel] [PATCH qemu-server/novnc/manager/docs v9 0/5] Feature VNC-Clipboard

2023-07-17 Thread Thomas Lamprecht
Am 15/06/2023 um 14:11 schrieb Dominik Csapak: > Looks good from my side now, maybe someone else wants to chime in > regarding the splitting of the setting in the gui (but IMHO that's good) > I'm torn about that, as IMO it would be a slightly better fit there, but if we'd move it we'd also need t

[pve-devel] applied: [PATCH pve-docs] pmxcfs: fix incorrect exmple command

2023-07-17 Thread Thomas Lamprecht
Am 14/07/2023 um 11:18 schrieb Philipp Hufnagl: > There is an error in this example. The .conf has to be moved in the > quemu-server folder of the new node for the migration to work. > > Signed-off-by: Philipp Hufnagl > --- > pmxcfs.adoc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

[pve-devel] applied: [PATCH installer] tui: use EULA path from ISO info instead of hard-coding

2023-07-17 Thread Thomas Lamprecht
Am 14/07/2023 um 11:29 schrieb Christoph Heiss: > .. in the same fashion as the GUI installer. > See also proxinstall:create_intro_view() for reference. > > Signed-off-by: Christoph Heiss > --- > proxmox-tui-installer/src/main.rs | 10 ++ > proxmox-tui-installer/src/setup.rs | 17 ++

Re: [pve-devel] [PATCH pve-manager v3]ui: add field to set subdir-depth in web interface

2023-07-17 Thread Thomas Lamprecht
Am 15/06/2023 um 14:03 schrieb Noel Ullreich: > When adding or editing a storage device in Datacenter->Storage in the > web interface, the subdirectory depth can be set in the advanced menu. > > Signed-off-by: Noel Ullreich > --- > www/manager6/storage/Base.js | 11 +++ > 1 file changed,

[pve-devel] applied: [PATCH stable-7+master manager] pve7to8: fix Ceph noout check

2023-07-17 Thread Thomas Lamprecht
Am 17/07/2023 um 10:38 schrieb Fiona Ebner: > Commit 114e5f2c ("pve7to8: sync over from stable-7 branch") > accidentally got rid of the correct value 0 here and also the new TODO > message to improve the situation. But the TODO is actually easy, > because there already is the $upgraded variable. Ju

[pve-devel] applied: [PATCH manager v3] fix #4758: ui: lxc wizard: allow multiple ssh keys

2023-07-17 Thread Thomas Lamprecht
Am 17/07/2023 um 14:34 schrieb Dominik Csapak: > by converting the textfield into a textarea and validate the value > line wise (if there is more than one line) > > also create a 'MultiFileButton' (mostly copied from extjs) that allows > to select multiple files at once > > Signed-off-by: Dominik

[pve-devel] applied: [PATCH docs] cgroup: update note about legacy cgroup controller support

2023-07-17 Thread Thomas Lamprecht
Am 14/07/2023 um 15:34 schrieb Friedrich Weber: > The 7->8 upgrade guide [1] mentions that cgroup v1 will be deprecated > starting from PVE 9.0, so also mention this in the docs. > > [1] https://pve.proxmox.com/wiki/Upgrade_from_7_to_8#cgroup_V1_Deprecation > > Signed-off-by: Friedrich Weber > -

[pve-devel] [PATCH manager v3] fix #4758: ui: lxc wizard: allow multiple ssh keys

2023-07-17 Thread Dominik Csapak
by converting the textfield into a textarea and validate the value line wise (if there is more than one line) also create a 'MultiFileButton' (mostly copied from extjs) that allows to select multiple files at once Signed-off-by: Dominik Csapak --- changes from v2: * added comments to indicate wh

Re: [pve-devel] [PATCH manager v2] fix #4758: ui: lxc wizard: allow multiple ssh keys

2023-07-17 Thread Thomas Lamprecht
Am 17/07/2023 um 11:03 schrieb Dominik Csapak: > On 7/13/23 12:09, Christoph Heiss wrote: >> also: s/let/const/ >> > > hmm... we don't really have a style recommendation which to prefer. > maybe we should improve our style guideline to have some more hints when to > use const > and when to use le

[pve-devel] applied-series: [PATCH v2 qemu-server 1/4] qmeventd: improve getting VMID from PID in presence of legacy cgroup entries

2023-07-17 Thread Wolfgang Bumiller
applied series, thanks ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] applied: [PATCH] kvm: xsave set: mask-out PKRU bit in xfeatures if vCPU has no support

2023-07-17 Thread Fiona Ebner
Am 14.07.23 um 20:30 schrieb Thomas Lamprecht: > > If it gains us something we can drop this patch a bit in the future > Proxmox VE 9 major release, but we should ensure that VMs that where > started before PVE 8 cannot be directly live-migrated to the release > that includes that change; so we sh

Re: [pve-devel] [PATCH manager v2] fix #4758: ui: lxc wizard: allow multiple ssh keys

2023-07-17 Thread Dominik Csapak
On 7/13/23 12:09, Christoph Heiss wrote: On Mon, Jul 03, 2023 at 04:51:16PM +0200, Dominik Csapak wrote: by converting the textfield into a textarea and validate the value line wise (if there is more than one line) also create a 'MultiFileButton' (mostly copied from extjs) that allows to selec

[pve-devel] applied: [PATCH firewall] parser: fix scoped alias resolution

2023-07-17 Thread Wolfgang Bumiller
applied & bumped, thanks On Tue, Jul 11, 2023 at 11:41:15AM +0200, Leo Nunner wrote: > We tried to resolve aliases in some places where the cluster > configuration didn't get set. It's probably better to handle these cases > directly in the function at hand, instead of at every place where this >

[pve-devel] [PATCH stable-7+master manager] pve7to8: fix Ceph noout check

2023-07-17 Thread Fiona Ebner
Commit 114e5f2c ("pve7to8: sync over from stable-7 branch") accidentally got rid of the correct value 0 here and also the new TODO message to improve the situation. But the TODO is actually easy, because there already is the $upgraded variable. Just rely on that instead of hard-coding and forgettin

Re: [pve-devel] [PATCH docs v6 1/1] added shared filesystem doc for virtio-fs

2023-07-17 Thread Christoph Heiss
w.r.t the subject line: s/added/add/, should not be past-tense As mentioned in the cover letter reply, a sentence explaining what the mount tag is and about the virtio/WinFsp drivers situation would also be useful. On Thu, Jul 06, 2023 at 12:54:13PM +0200, Markus Frank wrote: > > Signed-off-by:

Re: [pve-devel] [PATCH cluster/guest-common/qemu-server/manager v6 0/11] virtiofs

2023-07-17 Thread Christoph Heiss
Tested the whole series, using Debian 12 and Windows 11 as guest machines. Works fine with both. Two small things overall that I noticed, although only really pertaining to documentation: * It should be explained in the docs and via a tooltip in the GUI what the "mount tag" is / does. Thi

[pve-devel] [PATCH container] config permission check: also check access for currently configured bridge

2023-07-17 Thread Fiona Ebner
Relevant when modifying or removing an existing network device. Signed-off-by: Fiona Ebner --- src/PVE/LXC.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index a531ea5..1e9af0f 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1316,7 +

[pve-devel] [PATCH qemu-server] api: update: also check access for currently configured bridge

2023-07-17 Thread Fiona Ebner
Relevant when modifying or removing an existing network device. Signed-off-by: Fiona Ebner --- PVE/API2/Qemu.pm | 13 + 1 file changed, 13 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 59307133..fd718f93 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@