[pve-devel] [PATCH manager 2/2] cli: pve8to9: check for group and filter sections in notifications.cfg

2025-05-27 Thread Lukas Wagner
afterwards. Signed-off-by: Lukas Wagner --- PVE/CLI/pve8to9.pm | 37 + 1 file changed, 37 insertions(+) diff --git a/PVE/CLI/pve8to9.pm b/PVE/CLI/pve8to9.pm index 42b7073b..9d00e064 100644 --- a/PVE/CLI/pve8to9.pm +++ b/PVE/CLI/pve8to9.pm @@ -1372,6 +1372,42 @@ sub

[pve-devel] [PATCH manager 1/2] cli: copy pve7to8 to pve8to9

2025-05-27 Thread Lukas Wagner
This way we can start adding/adapting checks for the major upgrade to PVE 9. No changes were done apart from the Perl module name. Signed-off-by: Lukas Wagner --- PVE/CLI/Makefile |1 + PVE/CLI/pve8to9.pm | 1543 bin/Makefile | 10

[pve-devel] [PATCH proxmox] sendmail: fix test failures outside CET/CEST timezones

2025-05-26 Thread Lukas Wagner
from comparisons between the generated and reference emails. Signed-off-by: Lukas Wagner --- proxmox-sendmail/src/lib.rs | 66 +++-- 1 file changed, 42 insertions(+), 24 deletions(-) diff --git a/proxmox-sendmail/src/lib.rs b/proxmox-sendmail/src/lib.rs index d9c

[pve-devel] [PATCH v2 proxmox] notify: remove legacy filters and groups

2025-05-26 Thread Lukas Wagner
file. With the upcoming release of PVE 9 and PBS 4 we can drop the schema. The upgrade check scripts (e.g. pve8to9) will include checks to make sure that no legacy config sections are present any more. Signed-off-by: Lukas Wagner --- Notes: Intended for the `master` branch. Ch

[pve-devel] [PATCH proxmox] notify: switch to proxmox-base64

2025-05-26 Thread Lukas Wagner
This also fixes any warnings that were shown during compilation because we were using the deprecated `base64::encode/decode` functions. Signed-off-by: Lukas Wagner --- Intended for the trixie bootstrap work on the master branch. Notes: Could probably also use the serde helpers from proxmox

[pve-devel] [PATCH proxmox master 2/2] notify: stop using deprecated functions from handlebars

2025-05-23 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/webhook.rs | 8 ++--- proxmox-notify/src/renderer/html.rs | 7 ++-- proxmox-notify/src/renderer/mod.rs | 43 +--- proxmox-notify/src/renderer/plaintext.rs | 7 ++-- 4 files changed, 25 insertions

[pve-devel] [PATCH proxmox master 1/2] notify: migrate to handlebars 5

2025-05-23 Thread Lukas Wagner
No major changes were needed, just some minor changes on how we have to handle errors in helpers. Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/webhook.rs | 8 +--- proxmox-notify/src/renderer/html.rs | 10 +++--- proxmox-notify/src/renderer/plaintext.rs | 10

[pve-devel] [PATCH proxmox 1/3] notify: smtp: move building of forwarded mails to separate function

2025-05-23 Thread Lukas Wagner
This allows us to write some tests for it. No behavioral changes intended. Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/smtp.rs | 189 ++- 1 file changed, 97 insertions(+), 92 deletions(-) diff --git a/proxmox-notify/src/endpoints/smtp.rs b/proxmox

[pve-devel] [PATCH debcargo-config 1/3] import mail-parser from bookworm

2025-05-23 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/mail-parser/debian/changelog | 11 +++ src/mail-parser/debian/copyright | 49 .../debian/copyright.debcargo.hint| 77 +++ src/mail-parser/debian/debcargo.toml | 2 + 4 files changed

[pve-devel] [PATCH debcargo-config 2/3] package hashify 0.2.6

2025-05-23 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/hashify/debian/changelog | 6 +++ src/hashify/debian/copyright | 37 src/hashify/debian/copyright.debcargo.hint | 49 ++ src/hashify/debian/debcargo.toml | 2 + 4 files changed, 94

[pve-devel] [PATCH proxmox 2/3] notify: smtp: add test for building forwarded messages

2025-05-23 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/smtp.rs | 32 ++ proxmox-notify/testdata/test1.msg | 104 ++ .../test_forward_message_from_raw.ref | 95 3 files changed, 231 insertions(+) create mode 100644 proxmox

[pve-devel] [PATCH proxmox 3/3] notify: update mail-parser dependency to 0.11

2025-05-23 Thread Lukas Wagner
Thanks to the regression tests introduced in the previous commit we can be certain that everything works as it should. Signed-off-by: Lukas Wagner --- Cargo.toml | 2 +- proxmox-notify/src/endpoints/smtp.rs | 12 ++-- proxmox-notify/src/lib.rs| 3

[pve-devel] [PATCH debcargo-config 3/3] update mail-parser to 0.11.0

2025-05-23 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/mail-parser/debian/changelog | 6 +++ src/mail-parser/debian/copyright | 12 ++--- .../debian/copyright.debcargo.hint| 48 +-- 3 files changed, 36 insertions(+), 30 deletions(-) diff --git a/src/mail

[pve-devel] [PATCH debcargo-config/proxmox 0/6] package `mail-parser` for trixie; update proxmox-notify for newest mail-parser version

2025-05-23 Thread Lukas Wagner
This series packages the newest version of the `mail-parser` crate along with its new `hashify` dep for Debian Trixie. The second part of the series adapts proxmox-notify to the changes in `mail-parser`'s API. debcargo-conf: Lukas Wagner (3): import mail-parser from bookworm pa

[pve-devel] [PATCH debcargo-config proxmox/trixie 2/4] update email-encoding to 0.3.1

2025-05-23 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/email-encoding/debian/changelog | 7 +++ .../debian/copyright.debcargo.hint| 6 +- .../debian/patches/downgrade_base64.diff | 57 --- src/email-encoding/debian/patches/series | 1 - 4 files changed, 10

[pve-devel] [PATCH debcargo-config proxmox/trixie 1/4] import email-encoding from bookworm

2025-05-23 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/email-encoding/debian/changelog | 13 + src/email-encoding/debian/copyright | 37 .../debian/copyright.debcargo.hint| 49 src/email-encoding/debian/debcargo.toml | 2 + .../debian/patches

[pve-devel] [PATCH debcargo-config proxmox/trixie 3/4] import lettre from bookworm

2025-05-23 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/lettre/debian/changelog | 39 +++ src/lettre/debian/copyright | 38 +++ src/lettre/debian/copyright.debcargo.hint | 52 src/lettre/debian/debcargo.toml | 2 + src/lettre/debian/patches/relax

[pve-devel] [PATCH debcargo-config proxmox/trixie 4/4] update lettre to 0.11.13

2025-05-23 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/lettre/debian/changelog | 8 + src/lettre/debian/copyright.debcargo.hint | 4 +- src/lettre/debian/patches/relax-deps.patch| 14 +- .../patches/remove_unused_features.patch | 284 ++ 4 files changed, 177

[pve-devel] [PATCH debcargo-config proxmox/trixie 0/4] package lettre and

2025-05-23 Thread Lukas Wagner
, quite a few crates have a dependency on nom. I double checked lettre's release notes that there were no security issues fixed in 0.11.14-0.11.16 that would speak against packaging the slightly older version. Lukas Wagner (4): import email-encoding from bookworm update email-encoding to

Re: [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI

2025-04-10 Thread Lukas Wagner via pve-devel
the storage view itself. Noticed that under "Download from URL" there is no way to automatically extract compressed images the same way as we do it for ISO images. Is there some technical reason for this? Or is it just not implemented yet? Anyway, would be a nice addition for a future patch

[pve-devel] [PATCH pve-docs] notifications: add section about how to use custom templates

2025-04-09 Thread Lukas Wagner
This section is meant to give a basic overview on how to use custom templates for notifications. It will be expanded in the future, providing a more detailed view on how templates are resolved, existing fallback mechanisms, available templates, template variables and helpers. Signed-off-by: Lukas

[pve-devel] [PATCH pve-manager 3/4] notification: replication: add common properties to template data

2025-04-05 Thread Lukas Wagner
The new PVE::Notify::common_template_data helper gives us a hash of properties which should be available in all notifications (hostname, fqdn, cluster-name at this moment). This commit makes sure that replication notifications have these available. Signed-off-by: Lukas Wagner --- PVE/API2

[pve-devel] [PATCH cluster/ha-manager/manager 0/6] preparation for #6143: notification template cleanup

2025-04-04 Thread Lukas Wagner
ead try to render it nicely, trying to include all useful info from the former JSON dump Bumps: The patches for pve-manager and pve-ha-manager must depend on a bumped libpve-notify-perl due to the new 'PVE::Notify::common_template_data' helper. pve-cluster: Lukas Wagne

[pve-devel] [PATCH proxmox 2/2] notify: gotify: use constant from http crate for 'Authorization' header

2025-04-04 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/Cargo.toml | 2 +- proxmox-notify/src/endpoints/gotify.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-notify/Cargo.toml b/proxmox-notify/Cargo.toml index ddbaacd7..5a54c4a1 100644 --- a/proxmox-notify

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

2025-04-04 Thread Lukas Wagner
On 2025-04-03 12:34, Markus Frank wrote: > 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. > Some tho

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

2025-04-03 Thread Lukas Wagner
t_valid for the mappings on the > current node > * see individual patches > Cool stuff! Tried it out, seems to work as promised (only tested a Linux guest though) Tested-by: Lukas Wagner -- - Lukas ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] [PATCH qemu-server] config: add system and service credentials support

2025-04-03 Thread Lukas Wagner
On 2025-04-03 11:04, Thomas Lamprecht wrote: > Am 03.04.25 um 10:34 schrieb Maximiliano Sandoval: >> >> As per systemd-exec's man page, in total one can pass up to 1MB in >> system credentials. A VM config file is certainly not the vehicle for >> such an amount of data and I am also not fully comf

Re: [pve-devel] [PATCH proxmox] fix #6143: notify: allow overriding notification templates

2025-03-28 Thread Lukas Wagner
; used. Using an override template gets not logged. > > Signed-off-by: Alexander Zeidler > --- > This patch was previously sent as RFC and has now all suggestions from > Lukas Wagner implemented: > https://lore.proxmox.com/pve-devel/20250313151734.258337-1-a.zeid...@proxmox.com/ &

[pve-devel] superseded: [PATCH cluster/ha-manager/manager 0/6] preparation for #6143: notification template cleanup

2025-03-28 Thread Lukas Wagner
v2 available! Superseded-by: https://lore.proxmox.com/pve-devel/20250328101915.73951-1-l.wag...@proxmox.com/T/#t -- - Lukas ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

[pve-devel] [PATCH pve-manager v2 2/4] notifications: apt: clean up notification template

2025-03-28 Thread Lukas Wagner
the style/structure of the table. Signed-off-by: Lukas Wagner --- PVE/API2/APT.pm | 27 --- .../default/package-updates-body.html.hbs | 15 ++- .../default/package-updates-body.txt.hbs | 2 +- .../default/package-updates-subje

[pve-devel] [PATCH pve-manager v2 1/4] notification templates: vzdump: generate HTML table in template

2025-03-28 Thread Lukas Wagner
he table helper automatically aligns table columns - something that is not easily possible with native Handlebars syntax. Signed-off-by: Lukas Wagner --- PVE/VZDump.pm| 21 + templates/default/vzdump-body.html.hbs | 24 ++-- te

[pve-devel] [PATCH pve-ha-manager v2 1/1] notifications: overhaul fence notification

2025-03-28 Thread Lukas Wagner
manner Signed-off-by: Lukas Wagner --- src/PVE/HA/NodeStatus.pm | 43 +++ src/PVE/HA/Sim/Env.pm | 8 ++-- src/templates/default/fencing-body.html.hbs | 43 --- src/templates/default/fencing-body.txt.hbs| 40

[pve-devel] [PATCH pve-manager v2 4/4] notifications: test: style fixup

2025-03-28 Thread Lukas Wagner
Other commits introduced a consistent style for handlebars expressions, this commit applies the same style to test notification templates. Signed-off-by: Lukas Wagner --- templates/default/test-body.html.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/default

[pve-devel] [PATCH pve-manager v2 3/4] notification: replication: add common properties to template data

2025-03-28 Thread Lukas Wagner
The new PVE::Notify::common_template_data helper gives us a hash of properties which should be available in all notifications (hostname, fqdn, cluster-name at this moment). This commit makes sure that replication notifications have these available. Signed-off-by: Lukas Wagner --- PVE/API2

[pve-devel] [PATCH cluster/ha-manager/manager v2 0/6] preparation for #6143: notification template cleanup

2025-03-28 Thread Lukas Wagner
::get_fqdn helper to get the FQDN (thx Thomas) pve-cluster: Lukas Wagner (1): notify: add common_template_data src/PVE/Notify.pm | 27 +++ 1 file changed, 27 insertions(+) pve-manager: Lukas Wagner (4): notification templates: vzdump: generate HTML table in template

[pve-devel] [PATCH pve-cluster v2 1/1] notify: add common_template_data

2025-03-28 Thread Lukas Wagner
This commit add the `common_template_data` sub to PVE::Notify, providing a convenient way to get a hash with properties that should be accessible from all templates, namely hostname, fqdn and cluster-name. Signed-off-by: Lukas Wagner --- Notes: Changes since v1: - use PVE::Tools

Re: [pve-devel] [PATCH pve-cluster 1/1] notify: add common_template_data

2025-03-28 Thread Lukas Wagner
On 2025-03-28 10:38, Thomas Lamprecht wrote: > Am 28.03.25 um 09:28 schrieb Lukas Wagner: >> We of course can cache the FQDN, but realistically speaking, this is only >> called once per >> notification being sent, thus any real-world performance impact is >> absolu

Re: [pve-devel] [PATCH pve-cluster 1/1] notify: add common_template_data

2025-03-28 Thread Lukas Wagner
On 2025-03-27 16:31, Thomas Lamprecht wrote: > Am 27.03.25 um 15:23 schrieb Lukas Wagner: >> This commit add the `common_template_data` sub to PVE::Notify, >> providing a convenient way to get a hash with properties that >> should be accessible from all templates, namely

[pve-devel] [PATCH pve-ha-manager 1/1] notifications: overhaul fence notification

2025-03-27 Thread Lukas Wagner
manner Signed-off-by: Lukas Wagner --- src/PVE/HA/NodeStatus.pm | 43 +++ src/PVE/HA/Sim/Env.pm | 8 ++-- src/templates/default/fencing-body.html.hbs | 43 --- src/templates/default/fencing-body.txt.hbs| 40

[pve-devel] [PATCH pve-manager 2/4] notifications: apt: clean up notification template

2025-03-27 Thread Lukas Wagner
the style/structure of the table. Signed-off-by: Lukas Wagner --- PVE/API2/APT.pm | 27 --- .../default/package-updates-body.html.hbs | 15 ++- .../default/package-updates-body.txt.hbs | 2 +- .../default/package-updates-subje

[pve-devel] [PATCH pve-manager 4/4] notifications: test: style fixup

2025-03-27 Thread Lukas Wagner
Other commits introduced a consistent style for handlebars expressions, this commit applies the same style to test notification templates. Signed-off-by: Lukas Wagner --- templates/default/test-body.html.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/default

[pve-devel] [PATCH pve-manager 1/4] notification templates: vzdump: generate HTML table in template

2025-03-27 Thread Lukas Wagner
he table helper automatically aligns table columns - something that is not easily possible with native Handlebars syntax. Signed-off-by: Lukas Wagner --- PVE/VZDump.pm| 21 + templates/default/vzdump-body.html.hbs | 24 ++-- te

[pve-devel] [PATCH pve-cluster 1/1] notify: add common_template_data

2025-03-27 Thread Lukas Wagner
This commit add the `common_template_data` sub to PVE::Notify, providing a convenient way to get a hash with properties that should be accessible from all templates, namely hostname, fqdn and cluster-name. Signed-off-by: Lukas Wagner --- src/PVE/Notify.pm | 20 1 file

Re: [pve-devel] applied: [PATCH proxmox 1/2] notify: webhook: gotify: set Content-Length header

2025-03-26 Thread Lukas Wagner
On 2025-03-26 11:11, Thomas Lamprecht wrote: > Am 26.03.25 um 10:54 schrieb Lukas Wagner: >> On 2025-03-25 19:41, Thomas Lamprecht wrote: >>> FWIW, as it was already encoded in the commit message for posterity I'd >>> have been fine with the comment being

Re: [pve-devel] applied: [PATCH proxmox 1/2] notify: webhook: gotify: set Content-Length header

2025-03-26 Thread Lukas Wagner
On 2025-03-25 19:41, Thomas Lamprecht wrote: > Am 21.03.25 um 10:56 schrieb Lukas Wagner: >> To quote from RFC 9110 [1]: >> >> A user agent SHOULD send Content-Length in a request when >> the method defines a meaning for enclosed content and it >> is n

[pve-devel] [PATCH proxmox 1/2] notify: webhook: gotify: set Content-Length header

2025-03-21 Thread Lukas Wagner
. While most services seemed to have worked fine without setting the header, some Microsoft services seem to require it to accept the webhook request [2]. [1] https://datatracker.ietf.org/doc/html/rfc9110#name-content-length [2] https://forum.proxmox.com/threads/158827 Signed-off-by: Lukas Wagner

Re: [pve-devel] [RFC proxmox] fix #6143: notify: allow overriding notification templates

2025-03-17 Thread Lukas Wagner
none of the template candidates could be > used. Using an override template gets not logged. > > Signed-off-by: Alexander Zeidler > --- > > Questions: > - Is there anything against the chosen override path? IMO they are fine, but somebody else should double-check. >

Re: [pve-devel] [PATCH widget-toolkit] fix #6088: notification: matcher: use more descriptive strings

2025-01-28 Thread Lukas Wagner
n most cases the rules carry even longer text. > Tested this quickly on PBS. As discussed off-list this change makes sense to me and should help avoid any confusion due to misleading translations as in the referenced BZ entry. Tested-by: Lukas Wagner Reviewed

[pve-devel] [PATCH manager] pull metric: fix node iowait metric

2025-01-02 Thread Lukas Wagner
uster/metrics/export endpoint we want the second one. Reported-by: Dominik Csapak Signed-off-by: Lukas Wagner --- PVE/PullMetric.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/PullMetric.pm b/PVE/PullMetric.pm index 92f4daef..954bd604 100644 --- a/PVE/PullMetric.pm +++

Re: [pve-devel] [PATCH proxmox-mail-forward 2/2] switch to proxmox-log

2024-12-06 Thread Lukas Wagner
On 2024-12-06 11:40, Gabriel Goller wrote: >> fn main() { >> -    if let Err(err) = syslog::init( >> -    syslog::Facility::LOG_DAEMON, >> -    log::LevelFilter::Info, >> -    Some("proxmox-mail-forward"), >> -    ) { >> +    if let Err(err) = proxmox_log::init_logger("PROXMOX_LOG",

[pve-devel] [PATCH proxmox 1/2] notify: smtp: add missing 'tracing' namespace prefix

2024-12-06 Thread Lukas Wagner
This section of code is only compiled when the 'mail-forwarder' feature is enabled, which might have been the reason why this was missed when the other places where log messages are produced were migrated to 'tracing'. Signed-off-by: Lukas Wagner --- proxmox-notify/src/e

[pve-devel] [PATCH proxmox-mail-forward 2/2] switch to proxmox-log

2024-12-06 Thread Lukas Wagner
The proxmox-notify crate now uses tracing for logging, hence we have to switch to proxmox-log (which configures the appropriate layers/subscribers for tracing). Signed-off-by: Lukas Wagner --- Cargo.toml | 5 ++--- src/main.rs | 16 +++- 2 files changed, 9 insertions(+), 12

Re: [pve-devel] [PATCH v3 1/2] log: add perlmod logger and custom formatter

2024-12-06 Thread Lukas Wagner
O: sample message". > > Reported-by: Maximiliano Sandoval > Reported-by: Lukas Wagner > Signed-off-by: Gabriel Goller > --- > > I didn't include Lukas's T-b as I changed quite a lot on this > patch. > Gave v3 another quick spin, seems to work as advertis

Re: [pve-devel] [PATCH v2] log: add perlmod logger

2024-12-05 Thread Lukas Wagner
On 2024-12-05 14:17, Gabriel Goller wrote: >> Minor nit: repo in the subject prefix is missing, also the order of patches >> should probably reversed. > > Happens when you don't use murpp, am I right? :) > >> Seems to work fine, now messages logged by proxmox-notify while being in >> task c

Re: [pve-devel] [PATCH v2] log: add perlmod logger

2024-12-05 Thread Lukas Wagner
On 2024-12-05 11:23, Gabriel Goller wrote: > Add special logger for perlmod. This one will print everything to > stderr (which will end up in the tasklog) and the errors to journald. > > Reported-by: Maximiliano Sandoval > Reported-by: Lukas Wagner > Signed-off-

Re: [pve-devel] [PATCH proxmox-perl-rs] log: change default output to stderr and only log errors to journald

2024-12-05 Thread Lukas Wagner
On 2024-12-05 11:16, Gabriel Goller wrote: > -proxmox-http-error = "0.1.0" > -proxmox-log = "0.2" > -proxmox-notify = { version = "0.5", features = ["pve-context"] } > +proxmox-http-error = { version = "0.1.0", > path="/home/ggoller/dev/proxmox/perlmod_logger/proxmox-http-error/" } > +proxmox-

Re: [pve-devel] [PATCH proxmox] notify: remove legacy filters and groups

2024-12-03 Thread Lukas Wagner
On 2024-12-02 16:29, Thomas Lamprecht wrote: > Am 02.12.24 um 14:32 schrieb Lukas Wagner: >> It has been a full year now, so I'd argue it is safe to drop these >> safety guards now. On the off chance that there are still systems out >> there which still h

[pve-devel] [PATCH proxmox] notify: remove legacy filters and groups

2024-12-02 Thread Lukas Wagner
It has been a full year now, so I'd argue it is safe to drop these safety guards now. On the off chance that there are still systems out there which still have these entries in their notifications.cfg, a manual removal from the file will be needed after this commit. Signed-off-by: Lukas

[pve-devel] [PATCH pve-manager] api: notification targets: fix permission check for POST/PUT

2024-11-29 Thread Lukas Wagner
rum: https://forum.proxmox.com/threads/158101 Fixes: a3fe9c54 ("api: notifications: require powerful privileges for target management") Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 96 +-- 1 file changed, 40 insertions(+), 56 deletions(-) diff --gi

Re: [pve-devel] [PATCH proxmox 1/6] notify: copy sendmail/forward fn's from proxmox_sys

2024-11-25 Thread Lukas Wagner
Ping for patches 3-6, these were never applied. They do not add any functional changes, but only aim to improve code style and add some tests. -- - Lukas ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/

[pve-devel] [PATCH pve-manager] ui: cluster join info: add clipboard icon to "Copy Information" button

2024-11-22 Thread Lukas Wagner
We use the same icon in other similar buttons already, e.g. for copying the TLS certificate fingerprint in PBS. Signed-off-by: Lukas Wagner --- www/manager6/dc/ClusterEdit.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/manager6/dc/ClusterEdit.js b/www/manager6/dc/ClusterEdit.js

[pve-devel] [PATCH proxmox 2/2] notify: webhook: gotify: set HTTP request timeout

2024-11-22 Thread Lukas Wagner
seconds. Signed-off-by: Lukas Wagner --- proxmox-notify/src/endpoints/gotify.rs | 5 - proxmox-notify/src/endpoints/webhook.rs | 6 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/proxmox-notify/src/endpoints/gotify.rs b/proxmox-notify/src/endpoints/gotify.rs index

[pve-devel] [PATCH proxmox 1/2] http: sync client: add HTTP request timeout option

2024-11-22 Thread Lukas Wagner
x27;ve opted to introduce the timeout to the sync client only for now. We can always revisit this at a later time and move the option to the HttpOptions struct. Signed-off-by: Lukas Wagner --- proxmox-http/src/client/sync.rs | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff

Re: [pve-devel] [PATCH qemu-server] query-machine-capabilities: make it work on non-x86 arch

2024-11-22 Thread Lukas Wagner
Hello, instead of modifying the CFLAGS variable in the makefile, you could make use of one of GCC's built-in defines [1] to check for the machine's architecture. For instance, you could do a `#if __x86_64__` or `#if __amd64__`. [1] https://blog.kowalczyk.info/article/j/guide-to-predefined-macros

Re: [pve-devel] [PATCH i18n] de: update translations

2024-11-19 Thread Lukas Wagner
On Tue Nov 19, 2024 at 2:40 PM CET, Shannon Sterz wrote: > #: proxmox-widget-toolkit/src/panel/WebhookEditPanel.js:406 > -#, fuzzy > msgid "Add {0}" > -msgstr "Modus: {0}" > +msgstr "Hinzufügen {0}" Hmmm, I think "{0} hinzufügen" would be better here? For context, this string is used for a butto

[pve-devel] [PATCH proxmox-mail-forward] buildsys: set setuid bit in installed proxmox-mail-forward binary

2024-11-19 Thread Lukas Wagner
A previous commit removed the part which sets the bit. Without the bit we cannot read the notification config, because Postfix invokes forwarding binaries as 'nobody'. Fixes: 32d813ce44b ("build: properly use cargo wrapper") Signed-off-by: Lukas Wagner --- Makefile | 1

Re: [pve-devel] [PATCH widget-toolkit v3 07/14] notification: add UI for adding/updating webhook targets

2024-11-19 Thread Lukas Wagner
On Mon Nov 11, 2024 at 11:09 PM CET, Thomas Lamprecht wrote: > Am 08.11.24 um 15:41 schrieb Lukas Wagner: > > The widgets for editing the headers/secrets were adapted from > > the 'Tag Edit' dialog from PVE's datacenter options. > > > > Apart from tha

Re: [pve-devel] [PATCH storage/qemu-server/manager v6] implement ova/ovf import for file based storages

2024-11-19 Thread Lukas Wagner
On Mon Nov 18, 2024 at 2:53 PM CET, Dominik Csapak wrote: > >> nothing special, I tested the feature using the Home Assistant .ova from > >> [1]. Downloaded the OVA to my local storage, pressed "import", did not > >> change *any* settings apart from ticking "live import". > >> The import works, but

Re: [pve-devel] [PATCH storage/qemu-server/manager v6] implement ova/ovf import for file based storages

2024-11-18 Thread Lukas Wagner
On Mon Nov 18, 2024 at 2:18 PM CET, Dominik Csapak wrote: > On 11/18/24 14:06, Lukas Wagner wrote: > > On Fri Nov 15, 2024 at 4:17 PM CET, Dominik Csapak wrote: > >> This series enables importing ova/ovf from directory based storages, > >> inclusive upload/downl

Re: [pve-devel] [PATCH storage/qemu-server/manager v6] implement ova/ovf import for file based storages

2024-11-18 Thread Lukas Wagner
: - In the UI, checking 'Live Import' does not seem to have any effect (is live import even available for OVA import?) Also, the 'Start a previously stopped VM on Proxmox VE' text does not make much sense in the context of OVAs, FWICT. - A help button for the dialo

[pve-devel] [PATCH manager v3 09/14] api: add routes for webhook notification endpoints

2024-11-08 Thread Lukas Wagner
These just call the API implementation via the perl-rs bindings. Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- PVE/API2/Cluster/Notifications.pm | 263 +- 1 file changed, 262 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Cluster/Notifications.pm

[pve-devel] [PATCH many v3 00/14] notifications: add support for webhook endpoints

2024-11-08 Thread Lukas Wagner
n (e.g. target name, URL) - Code documentation improvments - Mask secrets in errors returned from the proxmox-notify crate, hopefully preventing them to be shown in logs or error messages - Rebased on the latest master branches proxmox: Lukas Wagner (3): notify: renderer: adapt to chan

[pve-devel] [PATCH proxmox v3 02/14] notify: implement webhook targets

2024-11-08 Thread Lukas Wagner
ngs) - json (print a property as json) In the configuration, the body, header values and secret values are stored in base64 encoding so that we can store any string we want. Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- proxmox-notify/Cargo.toml | 9 +- proxmox-

[pve-devel] [PATCH widget-toolkit v3 07/14] notification: add UI for adding/updating webhook targets

2024-11-08 Thread Lukas Wagner
only be set/updated, but not retrieved/displayed. Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- src/Makefile | 1 + src/Schema.js | 5 + src/Utils.js | 20 ++ src/panel/WebhookEditPanel.js | 424 ++

[pve-devel] [PATCH proxmox v3 03/14] notify: add api for webhook targets

2024-11-08 Thread Lukas Wagner
r, it will be dropped. If 'secret' is present in the 'delete' array, all secrets will be dropped, apart from those which are also set/preserved in the same update call. Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- proxmox-notify/src/api/mod.rs | 20 +

[pve-devel] [PATCH proxmox-backup v3 11/14] api: notification: add API routes for webhook targets

2024-11-08 Thread Lukas Wagner
Copied and adapted from the Gotify ones. Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- src/api2/config/notifications/mod.rs | 2 + src/api2/config/notifications/webhook.rs | 175 +++ 2 files changed, 177 insertions(+) create mode 100644 src/api2/config

[pve-devel] [PATCH manager v3 08/14] api: notifications: use get_targets impl from proxmox-notify

2024-11-08 Thread Lukas Wagner
The get_targets API endpoint is now implemented in Rust. Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- PVE/API2/Cluster/Notifications.pm | 34 +-- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE

[pve-devel] [PATCH widget-toolkit v3 06/14] utils: add base64 conversion helper

2024-11-08 Thread Lukas Wagner
From: Gabriel Goller Add helper functions to convert from a utf8 string to a base64 string and vice-versa. Using the TextEncoder/TextDecoder we can support unicode such as emojis as well [0]. [0]: https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem Signed-off-by: Gabri

[pve-devel] [PATCH proxmox-perl-rs v3 04/14] common: notify: add bindings for webhook API routes

2024-11-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- common/src/notify.rs | 63 1 file changed, 63 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index e1b006b..fe192d5 100644 --- a/common/src/notify.rs +++ b/common/src

[pve-devel] [PATCH proxmox v3 01/14] notify: renderer: adapt to changes in proxmox-time

2024-11-08 Thread Lukas Wagner
again") Signed-off-by: Lukas Wagner --- proxmox-notify/src/renderer/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-notify/src/renderer/mod.rs b/proxmox-notify/src/renderer/mod.rs index 8574a3fb..82473d03 100644 --- a/proxmox-notify/src/renderer/mod.rs +++

[pve-devel] [PATCH proxmox-perl-rs v3 05/14] common: notify: add bindings for get_targets

2024-11-08 Thread Lukas Wagner
This allows us to drop the impl of that function on the perl side. Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- common/src/notify.rs | 9 + 1 file changed, 9 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index fe192d5..0f8a35d 100644 --- a/common

[pve-devel] [PATCH proxmox-backup v3 12/14] management cli: add CLI for webhook targets

2024-11-08 Thread Lukas Wagner
The code was copied and adapted from the gotify target CLI. Signed-off-by: Lukas Wagner --- .../notifications/mod.rs | 4 +- .../notifications/webhook.rs | 94 +++ 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 src/bin

[pve-devel] [PATCH proxmox-backup v3 14/14] docs: notification: add webhook endpoint documentation

2024-11-08 Thread Lukas Wagner
Same information as in pve-docs but translated to restructured text. Signed-off-by: Lukas Wagner --- docs/notifications.rst | 100 + 1 file changed, 100 insertions(+) diff --git a/docs/notifications.rst b/docs/notifications.rst index 4ba8db86..d059fa76

[pve-devel] [PATCH proxmox-backup v3 13/14] ui: utils: enable webhook edit window

2024-11-08 Thread Lukas Wagner
This allows users to add/edit new webhook targets. Signed-off-by: Lukas Wagner Tested-By: Stefan Hanreich --- www/Utils.js | 5 + 1 file changed, 5 insertions(+) diff --git a/www/Utils.js b/www/Utils.js index 4853be36..b715972f 100644 --- a/www/Utils.js +++ b/www/Utils.js @@ -482,6

[pve-devel] [PATCH docs v3 10/14] notification: add documentation for webhook target endpoints.

2024-11-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 93 ++ 1 file changed, 93 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index 2459095..b7470fe 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -178,6 +178,99

Re: [pve-devel] [PATCH widget-toolkit] fix #5836: ui: translate systemd states in ServiceView

2024-11-08 Thread Lukas Wagner
Thanks for giving this a shot! One comment inline On 2024-11-08 13:52, Timothy Nicholson wrote: > With this patch, all systemd states and unit states in the service > view use gettext to be translated. > > Signed-off-by: Timothy Nicholson > --- > As stated in the Bugzilla entry [0]: Up until n

Re: [pve-devel] [PATCH manager] fix #5810: ui: show confirmation/warning dialog for sdn apply

2024-10-30 Thread Lukas Wagner
On 2024-10-30 13:02, Timothy Nicholson wrote: > Signed-off-by: Timothy Nicholson > --- > This patch introduces a confirmation dialog for applying the SDN > configuration. As stated in the bugzilla entry [1], the main point of this > dialog is to warn the user that any pending network configurat

Re: [pve-devel] [PATCH manager 3/5] fix #5430: ui: vm: allow editing cdrom aio and cache options

2024-10-18 Thread Lukas Wagner
Some suggestions inline. Skimmed over the code to spot style issues, correctness was not really checked. On 2024-10-16 18:47, Daniel Kral wrote: > Adds cache and async I/O selectors to the CDROM Drive Edit modal window > in the "Hardware" tab. This allows users to set these options in the > WebGU

Re: [pve-devel] [PATCH manager 2/5] ui: vm: factor out async I/O type selector

2024-10-18 Thread Lukas Wagner
Hello, one comment inline. Skimmed over the code to spot style issues, correctness was not really checked. On 2024-10-16 18:47, Daniel Kral wrote: > Factors out the combo box used for the Async I/O combo box selector, > which is used in the Disk Edit modal window in the VM "Hardware" tab and > t

Re: [pve-devel] [PATCH manager 4/5] ui: vm: make cloudinit drive editable

2024-10-18 Thread Lukas Wagner
Some suggestions inline. Skimmed over the code to spot style issues, correctness was not really checked. Same remarks regarding `var` vs `let` apply also to this patch. On 2024-10-16 18:47, Daniel Kral wrote: > Implements the functionality to allow subsequent changes to the > CloudInit drive und

Re: [pve-devel] [PATCH pve-manager 2/3] Fix #5708: Add CPU raw counters

2024-09-24 Thread Lukas Wagner
On 2024-09-24 14:25, Daniel Kral wrote: > On 9/17/24 07:50, Sascha Westermann via pve-devel wrote: >> Add a map containing raw values from /proc/stat and "uptime_ticks" which >> can be used in combination with cpuinfo.user_hz to calculate CPU usage >> from two samples. "uptime_ticks" is only defin

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

2024-09-23 Thread Lukas Wagner
On 2024-07-22 19:36, Thomas Lamprecht wrote: >> Lukas Wagner (5): >> api: jobs: vzdump: pass job 'job-id' parameter >> ui: dc: backup: allow to set custom job id in advanced settings >> api: notification: add API for getting known metadata fields/values

Re: [pve-devel] [PATCH docs] pve-network: correct language errors

2024-08-13 Thread Lukas Wagner
the bond directly as bridge port. > This can be used to make the guest network fault-tolerant. > > .Example: Use a bond as bridge port Apart from this, this looks good to me: Reviewed-by: Lukas Wagner -- - Lukas ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] [PATCH proxmox-perl-rs] update to proxmox-log 0.2

2024-08-06 Thread Lukas Wagner
nged, 5 insertions(+), 7 deletions(-) > Did the same changes to get pve-rs compiling again in my local metrics branch, so consider this: Reviewed-by: Lukas Wagner -- - Lukas ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.

[pve-devel] [PATCH proxmox-perl-rs v2 11/15] pmg-rs: tfa: clippy: the borrowed expression implements the required traits

2024-08-02 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pmg-rs/src/tfa.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pmg-rs/src/tfa.rs b/pmg-rs/src/tfa.rs index 928b50b..af69721 100644 --- a/pmg-rs/src/tfa.rs +++ b/pmg-rs/src/tfa.rs @@ -178,7 +178,7 @@ mod export { #[try_from_ref

[pve-devel] [PATCH proxmox-perl-rs v2 12/15] pmg-rs: tfa: clippy: useless conversion to the same type

2024-08-02 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pmg-rs/src/tfa.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmg-rs/src/tfa.rs b/pmg-rs/src/tfa.rs index af69721..4e9ce8f 100644 --- a/pmg-rs/src/tfa.rs +++ b/pmg-rs/src/tfa.rs @@ -178,7 +178,7 @@ mod export { #[try_from_ref] this

[pve-devel] [PATCH proxmox-perl-rs v2 13/15] pmg-rs: acme: clippy: reference is immediately deref'd by the compiler

2024-08-02 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pmg-rs/src/acme.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmg-rs/src/acme.rs b/pmg-rs/src/acme.rs index 7ea78c6..e2e7327 100644 --- a/pmg-rs/src/acme.rs +++ b/pmg-rs/src/acme.rs @@ -403,7 +403,7 @@ pub mod export { this.inner

[pve-devel] [PATCH proxmox-perl-rs v2 02/15] pve-rs: tfa: clippy: this function has too many arguments

2024-08-02 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- pve-rs/src/tfa.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pve-rs/src/tfa.rs b/pve-rs/src/tfa.rs index 798cdad..6650151 100644 --- a/pve-rs/src/tfa.rs +++ b/pve-rs/src/tfa.rs @@ -409,6 +409,7 @@ mod export { methods::list_tfa(&this.inner.

[pve-devel] [PATCH proxmox-perl-rs v2 14/15] pmg-rs: acme: simplify acount config saving

2024-08-02 Thread Lukas Wagner
We already depend on proxmox_sys, so we can just use `replace_file`. Fixing a clippy warning (missing truncate setting for OpenOptions) is an added benefit. Signed-off-by: Lukas Wagner --- pmg-rs/src/acme.rs | 62 ++ 1 file changed, 13 insertions

[pve-devel] [PATCH proxmox-perl-rs v2 15/15] tree-wide: run cargo fmt

2024-08-02 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- New in v2 common/src/subscription.rs | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/common/src/subscription.rs b/common/src/subscription.rs index d4c7227..594c778 100644 --- a/common/src/subscription.rs +++ b/common/src

  1   2   3   4   5   6   7   8   9   10   >