Re: [pve-devel] [PATCH many v8 00/13] notifications: notification metadata matching improvements

2024-07-08 Thread Max Carrara
On Fri Jul 5, 2024 at 3:46 PM CEST, Lukas Wagner wrote: > This patch series attempts to improve the user experience when creating > notification matchers. The below can pretty much just be considered "proofreading" as I haven't built and tested your changes, but since you already got a lot of feed

Re: [pve-devel] [PATCH many v8 00/13] notifications: notification metadata matching improvements

2024-07-08 Thread Lukas Wagner
On 2024-07-08 10:12, Max Carrara wrote: > On Fri Jul 5, 2024 at 3:46 PM CEST, Lukas Wagner wrote: >> This patch series attempts to improve the user experience when creating >> notification matchers. > > The below can pretty much just be considered "proofreading" as I haven't > built and tested yo

[pve-devel] [PATCH docs v9 13/13] notifications: add note regarding when 'job-id' is set for backups

2024-07-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- notifications.adoc | 4 1 file changed, 4 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index bdfebd0..6425e6c 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -312,6 +312,10 @@ Notification Events |

[pve-devel] [PATCH manager v9 06/13] d/control: bump proxmox-widget-toolkit dependency to 4.1.4

2024-07-08 Thread Lukas Wagner
We need "utils: add mechanism to add and override translatable notification event descriptions in the product specific UIs" otherwise there is an error in the browser console. Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 d

[pve-devel] [PATCH widget-toolkit v9 09/13] notification: matcher: move match-calendar fields to panel

2024-07-08 Thread Lukas Wagner
Also introduce a local viewModel that is linked to a parent viewModel, allowing us to move the formulas to the panel. This should make the code more cohesive and easier to follow. No functional changes. Signed-off-by: Lukas Wagner Tested-by: Maximiliano Sandoval Reviewed-by: Max Carrara --- s

[pve-devel] [PATCH manager v9 03/13] ui: dc: backup: allow to set custom job id in advanced settings

2024-07-08 Thread Lukas Wagner
This might be useful if somebody wants to match on the new 'backup-job' field in a notification match rule. Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- www/manager6/dc/Backup.js | 4 www/manager6/panel/BackupAdvancedOptions.js | 23 + 2 f

[pve-devel] [PATCH pve-guest-common v9 01/13] vzdump: common: allow 'job-id' as a parameter without being in schema

2024-07-08 Thread Lukas Wagner
'job-id' is passed when a backup as started as a job and will be passed to the notification system as matchable metadata. It can be considered 'internal'. Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- src/PVE/VZDump/Common.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[pve-devel] [PATCH widget-toolkit v9 07/13] notification: matcher: match-field: show known fields/values

2024-07-08 Thread Lukas Wagner
These changes introduce combogrid pickers for the 'field' and 'value' form elements for 'match-field' match rules. The 'field' picker shows a list of all known metadata fields, while the 'value' picker shows a list of all known values, filtered depending on the current value of 'field'. The list o

[pve-devel] [PATCH manager v9 05/13] ui: utils: add overrides for translatable notification fields/values

2024-07-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- www/manager6/Utils.js | 11 +++ 1 file changed, 11 insertions(+) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index f5608944..5b9d86ca 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -2059,6 +2059,1

[pve-devel] [PATCH manager v9 02/13] api: jobs: vzdump: pass job 'job-id' parameter

2024-07-08 Thread Lukas Wagner
This allows us to access the backup job id in the send_notification function, where we can set it as metadata for the notification. The 'job-id' parameter can only be used by 'root@pam' to prevent abuse. This has the side effect that manually triggered backup jobs cannot have the 'job-id' parameter

[pve-devel] [PATCH many v9 00/13] notifications: notification metadata matching improvements

2024-07-08 Thread Lukas Wagner
This patch series attempts to improve the user experience when creating notification matchers. Some of the noteworthy changes: - Allow setting a custom backup job ID, similar how we handle it for sync/prune jobs in PBS (to allow recognizable names used in matchers) - New metadata fields:

[pve-devel] [PATCH manager v9 04/13] api: notification: add API for getting known metadata fields/values

2024-07-08 Thread Lukas Wagner
This new API route returns known notification metadata fields and a list of known possible values. This will be used by the UI to provide suggestions when adding/modifying match rules. Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- PVE/API2/Cluster/Notifications.pm | 139 +

[pve-devel] [PATCH docs v9 12/13] notifications: match-field 'exact'-mode can now match multiple values

2024-07-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- notifications.adoc | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index acca19b..bdfebd0 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -233,11 +

[pve-devel] [PATCH docs v9 11/13] notifications: describe new notification metadata fields

2024-07-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Reviewed-by: Max Carrara --- notifications.adoc | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index 25a9391..acca19b 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -301,19

[pve-devel] [PATCH widget-toolkit v9 08/13] notification: matcher: move match-field formulas to local viewModel

2024-07-08 Thread Lukas Wagner
This should make the code more cohesive and easier to follow. No functional changes. Signed-off-by: Lukas Wagner Tested-by: Maximiliano Sandoval Reviewed-by: Max Carrara --- src/window/NotificationMatcherEdit.js | 189 +- 1 file changed, 95 insertions(+), 94 deletions(

[pve-devel] [PATCH widget-toolkit v9 10/13] notification: matcher: move match-severity fields to panel

2024-07-08 Thread Lukas Wagner
Also introduce a local viewModel that is linked to a parent viewModel, allowing us to move the formulas to the panel. This should make the code more cohesive and easier to follow. No functional changes. Signed-off-by: Lukas Wagner Tested-by: Maximiliano Sandoval Reviewed-by: Max Carrara --- s

[pve-devel] [PATCH qemu] zeroinit: fix regression with filename parsing

2024-07-08 Thread Fiona Ebner
As reported in the community forum [0], cloning or importing images to RBD storages (without the krbd setting) was broken. This is a result of no filename parsing happening anymore in bdrv_open_child() after commit b242e7f ("backport fix for CVE-2024-4467"), which the zeroinit relied on for passing

Re: [pve-devel] [PATCH qemu] zeroinit: fix regression with filename parsing

2024-07-08 Thread Fiona Ebner
Am 08.07.24 um 12:09 schrieb Fiona Ebner: > As reported in the community forum [0], cloning or importing images > to RBD storages (without the krbd setting) was broken. This is a > result of no filename parsing happening anymore in bdrv_open_child() > after commit b242e7f ("backport fix for CVE-202

Re: [pve-devel] [PATCH installer 0/3] add check/rename for already-existing ZFS rpool

2024-07-08 Thread Christoph Heiss
Ping. Series still applies cleanly. On Thu, May 16, 2024 at 12:28:32PM GMT, Christoph Heiss wrote: > Pretty straight forward overall, implements a check for an exising > `rpool` on the system and ask the user whether they would like to rename > it, much in the same way as it works for VGs already.

[pve-devel] [PATCH qemu-server] fix #5574: api: fix permission check for 'spice' usb port

2024-07-08 Thread Dominik Csapak
With the last change in the permission check, I accidentally broke the check for 'spice' host value, since in the if/elsif/else this will fall through to the else case which was only intended for when neither 'host' nor 'mapping' was set. This made 'spice' only settable by root@pam since there we

Re: [pve-devel] [PATCH qemu] zeroinit: fix regression with filename parsing

2024-07-08 Thread Fiona Ebner
Am 08.07.24 um 12:09 schrieb Fiona Ebner: > As reported in the community forum [0], cloning or importing images > to RBD storages (without the krbd setting) was broken. This is a > result of no filename parsing happening anymore in bdrv_open_child() > after commit b242e7f ("backport fix for CVE-202

Re: [pve-devel] [PATCH storage v4] fix #4272: btrfs: add rename feature

2024-07-08 Thread Aaron Lauterer
gave this a test spin once more with VM disks. default RAW ones and manually placed qcow2 and vmdk images for the fallback option to the SUPER implementation Tested-By: Aaron Lauterer Reviewed-By: Aaron Lauterer On 2024-07-05 15:10, Maximiliano Sandoval wrote: Adds the ability to change

[pve-devel] [PATCH qemu-server v11 4/12] control: add virtiofsd as runtime dependency for qemu-server

2024-07-08 Thread Markus Frank
Signed-off-by: Markus Frank --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 2b5c8e3..61d0cf3 100644 --- a/debian/control +++ b/debian/control @@ -55,6 +55,7 @@ Depends: dbus, socat, swtpm, swtpm-tools, +

[pve-devel] [PATCH qemu-server v11 7/12] disable snapshot (with RAM) and hibernate with virtio-fs devices

2024-07-08 Thread Markus Frank
Signed-off-by: Markus Frank --- PVE/API2/Qemu.pm | 6 ++ PVE/QemuServer.pm | 4 2 files changed, 10 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index f4982b0..854ad98 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -5246,6 +5246,12 @@ __PACKAGE__->register_me

[pve-devel] [PATCH qemu-server v11 6/12] migration: check_local_resources for virtiofs

2024-07-08 Thread Markus Frank
add dir mapping checks to check_local_resources Since the VM needs to be powered off for migration, migration should work with a directory on shared storage with all caching settings. Signed-off-by: Markus Frank --- PVE/QemuServer.pm| 10 +- test/MigrationTest/Shared.pm | 7

[pve-devel] [PATCH manager v11 10/12] ui: add resource mapping view for directories

2024-07-08 Thread Markus Frank
Signed-off-by: Markus Frank --- www/manager6/Makefile | 1 + www/manager6/dc/Config.js | 10 +++ www/manager6/dc/DirMapView.js | 50 +++ 3 files changed, 61 insertions(+) create mode 100644 www/manager6/dc/DirMapView.js diff --git a/www/manager6/

[pve-devel] [PATCH manager v11 08/12] api: add resource map api endpoints for directories

2024-07-08 Thread Markus Frank
Signed-off-by: Markus Frank --- PVE/API2/Cluster/Mapping.pm | 7 + PVE/API2/Cluster/Mapping/Dir.pm | 317 ++ PVE/API2/Cluster/Mapping/Makefile | 1 + 3 files changed, 325 insertions(+) create mode 100644 PVE/API2/Cluster/Mapping/Dir.pm diff --git a/PVE/AP

[pve-devel] [PATCH cluster v11 1/12] add mapping/dir.cfg for resource mapping

2024-07-08 Thread Markus Frank
Add it to both the perl side (PVE/Cluster.pm) and pmxcfs side (status.c). This dir.cfg is used to map directory IDs to paths on selected hosts. Signed-off-by: Markus Frank Reviewed-by: Fiona Ebner --- src/PVE/Cluster.pm | 1 + src/pmxcfs/status.c | 1 + 2 files changed, 2 insertions(+) diff -

[pve-devel] [PATCH cluster/guest-common/docs/qemu-server/manager v11 0/12] virtiofs

2024-07-08 Thread Markus Frank
Virtio-fs is a shared file system that enables sharing a directory between host and guest VMs. It takes advantage of the locality of virtual machines and the hypervisor to get a higher throughput than the 9p remote file system protocol. build-order: 1. cluster 2. guest-common 3. docs 4. qemu-serve

[pve-devel] [PATCH guest-common v11 2/12] add dir mapping section config

2024-07-08 Thread Markus Frank
Adds a config file for directories by using a 'map' property string for each node mapping. Next to node & path, there is the optional submounts parameter in the map property string that is used to announce other mounted file systems in the specified directory. Additionally there are the default s

[pve-devel] [PATCH manager v11 11/12] ui: form: add selector for directory mappings

2024-07-08 Thread Markus Frank
Signed-off-by: Markus Frank --- www/manager6/Makefile | 1 + www/manager6/form/DirMapSelector.js | 63 + 2 files changed, 64 insertions(+) create mode 100644 www/manager6/form/DirMapSelector.js diff --git a/www/manager6/Makefile b/www/manager6/Makefile

[pve-devel] [PATCH docs v11 3/12] add doc section for the shared filesystem virtio-fs

2024-07-08 Thread Markus Frank
Signed-off-by: Markus Frank --- qm.adoc | 97 +++-- 1 file changed, 95 insertions(+), 2 deletions(-) diff --git a/qm.adoc b/qm.adoc index 42c26db..71c8d40 100644 --- a/qm.adoc +++ b/qm.adoc @@ -1081,6 +1081,98 @@ recommended to always use a lim

[pve-devel] [PATCH manager v11 12/12] ui: add options to add virtio-fs to qemu config

2024-07-08 Thread Markus Frank
Signed-off-by: Markus Frank --- www/manager6/Makefile | 1 + www/manager6/Utils.js | 1 + www/manager6/qemu/HardwareView.js | 19 + www/manager6/qemu/VirtiofsEdit.js | 137 ++ 4 files changed, 158 insertions(+) create mode 100644 www/m

[pve-devel] [PATCH manager v11 09/12] ui: add edit window for dir mappings

2024-07-08 Thread Markus Frank
Signed-off-by: Markus Frank --- www/manager6/Makefile | 1 + www/manager6/window/DirMapEdit.js | 230 ++ 2 files changed, 231 insertions(+) create mode 100644 www/manager6/window/DirMapEdit.js diff --git a/www/manager6/Makefile b/www/manager6/Makefile i

[pve-devel] [PATCH qemu-server v11 5/12] fix #1027: virtio-fs support

2024-07-08 Thread Markus Frank
add support for sharing directories with a guest vm. virtio-fs needs virtiofsd to be started. In order to start virtiofsd as a process (despite being a daemon it is does not run in the background), a double-fork is used. virtiofsd should close itself together with QEMU. There are the parameters

[pve-devel] applied: [PATCH qemu] zeroinit: fix regression with filename parsing

2024-07-08 Thread Fabian Grünbichler
with the missing link added to the commit message. On July 8, 2024 12:09 pm, Fiona Ebner wrote: > As reported in the community forum [0], cloning or importing images > to RBD storages (without the krbd setting) was broken. This is a > result of no filename parsing happening anymore in bdrv_open_ch

Re: [pve-devel] [PATCH installer 3/3] low-level: install: check for already-existing `rpool` on install

2024-07-08 Thread Aaron Lauterer
On 2024-05-16 12:28, Christoph Heiss wrote: .. in the same manner as the detection for LVM works. zpools can only be renamed by importing them with a new name, so unfortunaly the import-export dance is needed. Signed-off-by: Christoph Heiss --- Proxmox/Install.pm | 33 ++

Re: [pve-devel] [PATCH installer 1/3] low-level: add zfs module for retrieving importable zpool info

2024-07-08 Thread Aaron Lauterer
On 2024-05-16 12:28, Christoph Heiss wrote: Signed-off-by: Christoph Heiss --- Proxmox/Makefile | 1 + Proxmox/Sys/ZFS.pm| 43 ++ test/Makefile | 6 + test/zfs-get-pool-list.pl | 49 +

Re: [pve-devel] [PATCH v2 pve-manager 2/2] ui: qemu : memoryedit: add new max && virtio fields

2024-07-08 Thread Fiona Ebner
Am 06.09.23 um 00:35 schrieb DERUMIER, Alexandre: > Le mardi 05 septembre 2023 à 17:16 +0200, Thomas Lamprecht a écrit : >> Am 05/09/2023 um 17:10 schrieb DERUMIER, Alexandre: The advantage with 'max' is that it can be used for both, hotplug with dimms and virtio-mem. Otherwise,

Re: [pve-devel] [PATCH installer 1/3] low-level: add zfs module for retrieving importable zpool info

2024-07-08 Thread Christoph Heiss
Thanks for the review! On Mon, Jul 08, 2024 at 04:24:16PM GMT, Aaron Lauterer wrote: > On 2024-05-16 12:28, Christoph Heiss wrote: > > [..] > > diff --git a/Proxmox/Sys/ZFS.pm b/Proxmox/Sys/ZFS.pm > > new file mode 100644 > > index 000..4c732ca > > --- /dev/null > > +++ b/Proxmox/Sys/ZFS.pm

Re: [pve-devel] [PATCH installer 3/3] low-level: install: check for already-existing `rpool` on install

2024-07-08 Thread Christoph Heiss
On Mon, Jul 08, 2024 at 04:16:23PM GMT, Aaron Lauterer wrote: > On 2024-05-16 12:28, Christoph Heiss wrote: > > [..] > > +sub zfs_ask_existing_zpool_rename { > > +my ($pool_name) = @_; > > + > > +# At this point, no pools should be imported/active > > +my $exported_pools = Proxmox::Sy

[pve-devel] [PATCH perl-rs 3/5] perl-rs: add further apt api calls

2024-07-08 Thread Wolfgang Bumiller
From: Dietmar Maurer Signed-off-by: Dietmar Maurer --- common/src/apt/repositories.rs | 49 +- pmg-rs/Cargo.toml | 2 +- pve-rs/Cargo.toml | 2 +- pve-rs/src/lib.rs | 2 +- 4 files changed, 51 insertions(+), 4 deletions(-

[pve-devel] applied-series: [PATCH perl-rs 1/5] perl-rs: use proxmox-apt-api-types

2024-07-08 Thread Wolfgang Bumiller
From: Dietmar Maurer Signed-off-by: Dietmar Maurer --- common/src/apt/repositories.rs | 57 +- pmg-rs/Cargo.toml | 14 - pmg-rs/src/apt/repositories.rs | 8 +++-- pve-rs/Cargo.toml | 12 +++ pve-rs/src/apt/repositories.rs |

[pve-devel] [PATCH perl-rs 2/5] perl-rs: use api functions from proxmox-apt

2024-07-08 Thread Wolfgang Bumiller
From: Dietmar Maurer Signed-off-by: Dietmar Maurer --- common/src/apt/repositories.rs | 117 +++-- pmg-rs/src/apt/repositories.rs | 11 +++- pve-rs/src/apt/repositories.rs | 13 ++-- 3 files changed, 26 insertions(+), 115 deletions(-) diff --git a/common/src/apt/r

[pve-devel] [PATCH perl-rs 5/5] apt: minor parameter cleanup

2024-07-08 Thread Wolfgang Bumiller
We cannot use &[&str] - since this would be a poitner to a `[&str]` data structure, that's not how perl stores strings. But we *can* use Vec<&str> - here, the Vec will be allocated, but the contents will borrow. We don't need to transform this afterwards. Signed-off-by: Wolfgang Bumiller --- com

[pve-devel] [PATCH perl-rs 4/5] pve-rs: common: send apt update notification via proxmox-notify

2024-07-08 Thread Wolfgang Bumiller
From: Lukas Wagner For PMG we for now only provide an empty stub and warn to syslog - we need basic notification system integration there first. On PMG, we still use a pure Perl implementation at the moment, so this should not be an issue unless we change that. Signed-off-by: Lukas Wagner ---