[pve-devel] [PATCH manager v7 03/19] ui: dc: backup: send 'job-id' property when starting a backup job manually

2024-06-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/dc/Backup.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js index 4ba80b31..4b45b5c6 100644 --- a/www/manager6/dc/Backup.js +++ b/www/manager6/dc/Backup.js @@ -604,11 +604,12

[pve-devel] [PATCH manager v7 05/19] api: replication: add 'job-id' to notification metadata

2024-06-10 Thread Lukas Wagner
This allows users to create notification match rules for specific replication jobs, if they so desire. Signed-off-by: Lukas Wagner --- PVE/API2/Replication.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm index d84ac1ab..620

[pve-devel] [PATCH manager v7 07/19] api: replication: include 'hostname' field for notifications

2024-06-10 Thread Lukas Wagner
The field contains the hostname of the host (without any domain part) which sends the notification. This field can be used in match-field match rules. Signed-off-by: Lukas Wagner --- PVE/API2/Replication.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/API2/Replication.pm b/PVE/API2/

[pve-devel] [PATCH manager v7 04/19] ui: dc: backup: allow to set custom job id in advanced settings

2024-06-10 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 --- www/manager6/Utils.js | 1 + www/manager6/dc/Backup.js | 4 www/manager6/panel/BackupAdvancedOptions.js | 23

[pve-devel] [PATCH many v7 00/19] notifications: notification metadata matching improvements

2024-06-10 Thread Lukas Wagner
This patch series attempts to improve the user experience when creating notification matchers. Some of the noteworthy changes: - Fixup inconsistent 'hostname' field. Some notification events sent the hostname including a domain, while other did not. This series unifies the behavior, now the

[pve-devel] [PATCH manager v7 10/19] d/control: bump proxmox-widget-toolkit dependency to 4.1.4

2024-06-10 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 --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

[pve-devel] [PATCH docs v7 15/19] notification: clarify that 'hostname' does not include the domain

2024-06-10 Thread Lukas Wagner
This was a bit inconsistent between the different notification types: - APT/VZDump included the domain part - fence notifications did not A decision has been made to unify this by removing the domain part from APT/VZDump notifications. Signed-off-by: Lukas Wagner --- notifications.adoc | 2

[pve-devel] [PATCH docs v7 17/19] notifications: match-field 'exact'-mode can now match multiple values

2024-06-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index dec878a..07f0b3e 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -221,11 +221,16 @@ configurable sch

[pve-devel] [PATCH docs v7 18/19] notifications: fix typo in 'notification'

2024-06-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notifications.adoc b/notifications.adoc index 07f0b3e..9c5228c 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -295,7 +295,7 @@ Notification Events [width="100%",opt

[pve-devel] [PATCH docs v7 16/19] notifications: describe new notification metadata fields

2024-06-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index 57053c8..dec878a 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -289,19 +289,21 @@ Notification E

[pve-devel] [PATCH manager v7 08/19] api: notification: add API for getting known metadata fields/values

2024-06-10 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 --- PVE/API2/Cluster/Notifications.pm | 139 ++ 1 file

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

2024-06-10 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 --- src/window/NotificationMatc

[pve-devel] [PATCH widget-toolkit v7 14/19] notification: matcher: move match-severity fields to panel

2024-06-10 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 --- src/window/NotificationMatc

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

2024-06-10 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 it can be considered 'internal'. Signed-off-by: Lukas Wagner --- src/PVE/VZDump/Common.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/VZDum

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

2024-06-10 Thread Lukas Wagner
This allows us to access us the backup job id in the send_notification function, where we can set it as metadata for the notification. Signed-off-by: Lukas Wagner --- PVE/API2/VZDump.pm | 8 PVE/Jobs/VZDump.pm | 4 +++- PVE/VZDump.pm | 6 +++--- 3 files changed, 14 insertions(+), 4

[pve-devel] [PATCH manager v7 06/19] vzdump: apt: notification: do not include domain in 'hostname' field

2024-06-10 Thread Lukas Wagner
- The man page warns about the usage of `hostname -f`, since a host may have multiple domains (or none at all) - The fallback PVE::INotify::nodename() already only returned the hostname without the domain part - Fencing notifications didn't include the domain part anyway This may result i

[pve-devel] [PATCH manager v7 09/19] ui: utils: add overrides for translatable notification fields/values

2024-06-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/Utils.js | 11 +++ 1 file changed, 11 insertions(+) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 5b0d51eb..ea448bfb 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -2060,6 +2060,17 @@ Ext.define('PVE.Utils

[pve-devel] [PATCH widget-toolkit v7 12/19] notification: matcher: move match-field formulas to local viewModel

2024-06-10 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 --- src/window/NotificationMatcherEdit.js | 189 +- 1 file changed, 95 insertions(+), 94 deletions(-) diff --git a/src/windo

[pve-devel] [PATCH widget-toolkit v7 11/19] notification: matcher: match-field: show known fields/values

2024-06-10 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 docs v7 19/19] notifications: backport some rephrased parts from PBS docs

2024-06-10 Thread Lukas Wagner
Most of the changes were done when adapting the PVE docs to the new PBS notification system, so now we 'backport' those improvements. Signed-off-by: Lukas Wagner --- notifications.adoc | 99 +++--- 1 file changed, 67 insertions(+), 32 deletions(-) diff --

Re: [pve-devel] [PATCH pve-qemu-kvm] patch: pbs block driver: correct a data type

2024-06-10 Thread Shannon Sterz
On Fri Jun 7, 2024 at 11:43 AM CEST, Jing Luo wrote: > gcc warns (-Werror=type-limits) that it will always be false for the > if statement. This is because here s->aid is defined as char, while > proxmox_restore_open_image() returns an int. Change the type to int. > Strangely gcc warns it on arm64

[pve-devel] [PATCH storage] volume import: assume target API version is at least 9

2024-06-10 Thread Fiona Ebner
The storage API version has been bumped to at least 9 since libpve-storage = 7.0-4. If the source node is on Proxmox VE 8, where this change will come in, then the target node can be assumed to be running either Proxmox VE 8 or, during upgrade, the latest version of Proxmox VE 7.4, so it's safe to

Re: [pve-devel] [PATCH pve-qemu-kvm] patch: pbs block driver: correct a data type

2024-06-10 Thread Fiona Ebner
Am 10.06.24 um 03:48 schrieb Jing Luo: > On 2024-06-07 20:49, Fiona Ebner wrote: >> Hi, >> >> if you haven't already done so, please send a signed copy of the Harmony >> CLA to off...@proxmox.com, see [0]. > > Hi, thanks for letting me know, this was done some time last week. > Okay :) >> Am 07

[pve-devel] [PATCH v4 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS

2024-06-10 Thread Christian Ebner
This patch series defines the vzdump configuration description as well as backup job configuration option in the WebUI to set the experimental `change-detection-mode` parameter to the proxmox-backup-client invocation for container backups having a Proxmox Backup Server storage target. This allows

[pve-devel] [PATCH v4 pve-container 2/4] vzdump: conditionally set PBS change detection mode option

2024-06-10 Thread Christian Ebner
Allows to switch the backup clients change detection mode based on the option set in the backup jobs configuration for backup jobs with Proxmox Backup Server target. Signed-off-by: Christian Ebner --- changes since version 4: - no changes src/PVE/VZDump/LXC.pm | 2 ++ 1 file changed, 2 insertio

[pve-devel] [PATCH v4 pve-manager 3/4] www: advanced backup: add pbs change detection mode selector

2024-06-10 Thread Christian Ebner
The proxmox backup client allows to switch the method used to encode data based on a change-detection-mode parameter. Expose this setting as experimental feature in the advanced panel for a backup job. Signed-off-by: Christian Ebner --- changes since version 3: - drop default value on set www/

[pve-devel] [PATCH v4 pve-manager 4/4] vzdump: add pbs-change-detection-mode to config template

2024-06-10 Thread Christian Ebner
Include the additional parameter to set the `change-detection-mode` for backup jobs with Proxmox Backup Server target as node wide configuration, including possible variants to be set. Signed-off-by: Christian Ebner --- changes since version 3: - no changes configs/vzdump.conf | 1 + 1 file cha

[pve-devel] [PATCH v4 pve-guest-common 1/4] vzdump: add PBS change detection mode configuration

2024-06-10 Thread Christian Ebner
Define the possible modes to be configured in a PBS file change detection mode. Signed-off-by: Christian Ebner --- changes since version 3: - dropped default value, use the PBS default src/PVE/VZDump/Common.pm | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/PVE/VZDump/Common.pm b

[pve-devel] applied-series: [PATCH v4 pve-guest-common pve-container pve-manager 0/4] change-detection-mode for PBS

2024-06-10 Thread Fabian Grünbichler
On June 10, 2024 11:57 am, Christian Ebner wrote: > This patch series defines the vzdump configuration description as well > as backup job configuration option in the WebUI to set the > experimental `change-detection-mode` parameter to the > proxmox-backup-client invocation for container backups ha

[pve-devel] [PATCH proxmox-firewall 1/1] rules: allow vital ICMP(v6) types

2024-06-10 Thread Stefan Hanreich
There are certain ICMP messages that should always pass through a firewall irregardless of any other rules. This is particularly important for ICMPv6. While we already handled NDP, there are certain control messages that should always be able to pass through any firewall, according to RFC 4890. Fo

[pve-devel] [PATCH qemu 1/7] PVE backup: fleecing: properly set minimum cluster size

2024-06-10 Thread Fiona Ebner
While the current code doesn't care, prepare for future changes relying on the flag being set as well. Signed-off-by: Fiona Ebner --- To be squashed into "PVE backup: add fleecing option" pve-backup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pve-backup.c b/pve-backup.c index 07709aa

[pve-devel] [RFC qemu] fix #3231+#3631: PVE backup: fail backup rather than guest write when backup target cannot be reached or is too slow

2024-06-10 Thread Fiona Ebner
A long-standing issue with VM backups in Proxmox VE is that a slow or unreachable target would lead to a copy-before-write (cbw) operation to break the guest write rather than abort the backup. This is unexpected to users and the will end up without a successful backup and without a working guest i

[pve-devel] [RFC qemu 6/7] block/copy-before-write: allow specifying error callback

2024-06-10 Thread Fiona Ebner
The callback is invoked when cbw is configured to not break the guest write. Will be useful to be able to abort a backup job immediately. Currently, it has to wait for the rest of the block copy operation to finish before checking the cbw error state. Since the job will be required for the callback

[pve-devel] [RFC qemu 3/7] block/backup: allow passing additional options for copy-before-write upon job creation

2024-06-10 Thread Fiona Ebner
In particular, useful for setting the 'on-cbw-error' and 'cbw-timeout' options (see BlockdevOptionsCbw in QAPI). Signed-off-by: Fiona Ebner --- block/backup.c | 10 +++--- block/replication.c| 2 +- blockdev.c | 2 +-

[pve-devel] [RFC qemu 4/7] block/backup: make cbw error also fail backup that does not use fleecing

2024-06-10 Thread Fiona Ebner
If the backup target can't be reached or is very slow, then the default behavior for QEMU backup is to break the guest write. While an option to change this was introduced with the 'on-cbw-error' option for the copy-before-write filter, it only took an effect in combination with a snapshot-access n

[pve-devel] [RFC qemu 7/7] block/backup: set callback for cbw errors

2024-06-10 Thread Fiona Ebner
The callback is invoked when cbw is configured to not break the guest write and will abort a backup job immediately. Currently the backup has to wait for the rest of the block copy operation to finish before checking the cbw error state. Signed-off-by: Fiona Ebner --- Note for testers: if e.g. t

[pve-devel] [RFC qemu 5/7] fix #3231+#3631: PVE backup: add timeout for copy-before-write operations and fail backup instead of guest writes

2024-06-10 Thread Fiona Ebner
If the backup target can't be reached or is very slow, then the default behavior for QEMU backup is to break the guest write. This is undesirable and it is more expected and less intrusive to make the backup error out instead. A timeout of 45 seconds for copy-before-write operations is set, like f

[pve-devel] [RFC qemu 2/7] block/copy-before-write: allow passing additional options for bdrv_cbw_append()

2024-06-10 Thread Fiona Ebner
In preparation to allow configuring 'on-cbw-error' and 'cbw-timeout' for a backup job. The previously already passed-in 'min-cluster-size' option is also passed-in via the QDict now. Signed-off-by: Fiona Ebner --- block/backup.c| 9 - block/copy-before-write.c | 8 b

[pve-devel] applied: [PATCH v2 pve-qemu-kvm] patches: pbs block driver: correct a data type

2024-06-10 Thread Fiona Ebner
Am 10.06.24 um 14:05 schrieb Jing Luo: > gcc warns (-Werror=type-limits) that it will always be false for the > if statement. This is because here s->aid is defined as char, while > proxmox_restore_open_image() returns an int. > > This is probably because chars are treated as unsigned on arm arch