public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v3 pve-manager 42/66] vzdump: send notifications via new notification module
Date: Mon, 17 Jul 2023 17:00:27 +0200	[thread overview]
Message-ID: <20230717150051.710464-43-l.wagner@proxmox.com> (raw)
In-Reply-To: <20230717150051.710464-1-l.wagner@proxmox.com>

... 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:
  - Use template-based notification text instead of endless
    string concatenations
  - Removing the old plaintext/HTML table rendering in favor of
    the new template/property-based approach offered by the
    `proxmox-notify` crate.
  - Rename `sendmail` sub to `send_notification`
  - Breaking out some of the code into helper subs, hopefully
    reducing the spaghetti factor a bit

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 PVE/API2/VZDump.pm |  10 +-
 PVE/VZDump.pm      | 335 +++++++++++++++++++++++++--------------------
 test/mail_test.pl  |  36 ++---
 3 files changed, 214 insertions(+), 167 deletions(-)

diff --git a/PVE/API2/VZDump.pm b/PVE/API2/VZDump.pm
index e3dcd0bd..3886772e 100644
--- a/PVE/API2/VZDump.pm
+++ b/PVE/API2/VZDump.pm
@@ -44,7 +44,9 @@ __PACKAGE__->register_method ({
 	    ."'Datastore.AllocateSpace' on the backup storage. The 'tmpdir', 'dumpdir' and "
 	    ."'script' parameters are restricted to the 'root\@pam' user. The 'maxfiles' and "
 	    ."'prune-backups' settings require 'Datastore.Allocate' on the backup storage. The "
-	    ."'bwlimit', 'performance' and 'ionice' parameters require 'Sys.Modify' on '/'.",
+	    ."'bwlimit', 'performance' and 'ionice' parameters require 'Sys.Modify' on '/'. "
+	    ."If 'notification-target' is set, then the 'Mapping.Use' permission is needed on "
+	    ."'/mapping/notification/<target>'.",
 	user => 'all',
     },
     protected => 1,
@@ -113,6 +115,10 @@ __PACKAGE__->register_method ({
 	    $rpcenv->check($user, "/storage/$storeid", [ 'Datastore.AllocateSpace' ]);
 	}
 
+	if (my $target = $param->{'notification-target'}) {
+	    PVE::Notify::check_may_use_target($target, $rpcenv);
+	}
+
 	my $worker = sub {
 	    my $upid = shift;
 
@@ -127,7 +133,7 @@ __PACKAGE__->register_method ({
 		$vzdump->getlock($upid); # only one process allowed
 	    };
 	    if (my $err = $@) {
-		$vzdump->sendmail([], 0, $err);
+		$vzdump->send_notification([], 0, $err);
 		exit(-1);
 	    }
 
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index c58e5f78..7dc9f31e 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -19,6 +19,7 @@ use PVE::Exception qw(raise_param_exc);
 use PVE::HA::Config;
 use PVE::HA::Env::PVE2;
 use PVE::JSONSchema qw(get_standard_option);
+use PVE::Notify;
 use PVE::RPCEnvironment;
 use PVE::Storage;
 use PVE::VZDump::Common;
@@ -317,21 +318,90 @@ sub read_vzdump_defaults {
     return $res;
 }
 
-use constant MAX_MAIL_SIZE => 1024*1024;
-sub sendmail {
-    my ($self, $tasklist, $totaltime, $err, $detail_pre, $detail_post) = @_;
+sub read_backup_task_logs {
+    my ($task_list) = @_;
 
-    my $opts = $self->{opts};
+    my $task_logs = "";
 
-    my $mailto = $opts->{mailto};
+    for my $task (@$task_list) {
+	my $vmid = $task->{vmid};
+	my $log_file = $task->{tmplog};
+	if (!$task->{tmplog}) {
+	    $task_logs .= "$vmid: no log available\n\n";
+	    next;
+	}
+	if (open (my $TMP, '<', "$log_file")) {
+	    while (my $line = <$TMP>) {
+		next if $line =~ /^status: \d+/; # not useful in mails
+		$task_logs .= encode8bit ("$vmid: $line");
+	    }
+	    close ($TMP);
+	} else {
+	    $task_logs .= "$vmid: Could not open log file\n\n";
+	}
+	$task_logs .= "\n";
+    }
 
-    return if !($mailto && scalar(@$mailto));
+    return $task_logs;
+}
 
-    my $cmdline = $self->{cmdline};
+sub build_guest_table {
+    my ($task_list) = @_;
+
+    my $table = {
+	schema => {
+	    columns => [
+		{
+		    label => "VMID",
+		    id  => "vmid"
+		},
+		{
+		    label => "Name",
+		    id  => "name"
+		},
+		{
+		    label => "Status",
+		    id  => "status"
+		},
+		{
+		    label => "Time",
+		    id  => "time",
+		    renderer => "duration"
+		},
+		{
+		    label => "Size",
+		    id  => "size",
+		    renderer => "human-bytes"
+		},
+		{
+		    label => "Filename",
+		    id  => "filename"
+		},
+	    ]
+	},
+	data => []
+    };
+
+    for my $task (@$task_list) {
+	my $successful = $task->{state} eq 'ok';
+	my $size = $successful ? $task->{size} : 0;
+	my $filename = $successful ? $task->{target} : undef;
+	push @{$table->{data}}, {
+	    "vmid" => $task->{vmid},
+	    "name" => $task->{hostname},
+	    "status" => $task->{state},
+	    "time" => $task->{backuptime},
+	    "size" => $size,
+	    "filename" => $filename,
+	};
+    }
+
+    return $table;
+}
 
-    my $ecount = 0;
-    foreach my $task (@$tasklist) {
-	$ecount++ if $task->{state} ne 'ok';
+sub sanitize_task_list {
+    my ($task_list) = @_;
+    for my $task (@$task_list) {
 	chomp $task->{msg} if $task->{msg};
 	$task->{backuptime} = 0 if !$task->{backuptime};
 	$task->{size} = 0 if !$task->{size};
@@ -342,164 +412,133 @@ sub sendmail {
 	    $task->{msg} = 'aborted';
 	}
     }
+}
 
-    my $notify = $opts->{mailnotification} || 'always';
-    return if (!$ecount && !$err && ($notify eq 'failure'));
+sub count_failed_tasks {
+    my ($tasklist) = @_;
 
-    my $stat = ($ecount || $err) ? 'backup failed' : 'backup successful';
-    if ($err) {
-	if ($err =~ /\n/) {
-	    $stat .= ": multiple problems";
-	} else {
-	    $stat .= ": $err";
-	    $err = undef;
-	}
+    my $error_count = 0;
+    for my $task (@$tasklist) {
+	$error_count++ if $task->{state} ne 'ok';
     }
 
+    return $error_count;
+}
+
+sub get_hostname {
     my $hostname = `hostname -f` || PVE::INotify::nodename();
     chomp $hostname;
+    return $hostname;
+}
 
-    # text part
-    my $text = $err ? "$err\n\n" : '';
-    my $namelength = 20;
-    $text .= sprintf (
-	"%-10s %-${namelength}s %-6s %10s %10s  %s\n",
-	qw(VMID NAME STATUS TIME SIZE FILENAME)
-    );
-    foreach my $task (@$tasklist) {
-	my $name = substr($task->{hostname}, 0, $namelength);
-	my $successful = $task->{state} eq 'ok';
-	my $size = $successful ? format_size ($task->{size}) : 0;
-	my $filename = $successful ? $task->{target} : '-';
-	my $size_fmt = $successful ? "%10s": "%8.2fMB";
-	$text .= sprintf(
-	    "%-10s %-${namelength}s %-6s %10s $size_fmt  %s\n",
-	    $task->{vmid},
-	    $name,
-	    $task->{state},
-	    format_time($task->{backuptime}),
-	    $size,
-	    $filename,
-	);
-    }
+my $subject_template = "vzdump backup status ({{hostname}}): {{status-text}}";
 
-    my $text_log_part;
-    $text_log_part .= "\nDetailed backup logs:\n\n";
-    $text_log_part .= "$cmdline\n\n";
+my $body_template = <<EOT;
+{{error-message}}
+{{heading-1 "Details"}}
+{{table guest-table}}
 
-    $text_log_part .= $detail_pre . "\n" if defined($detail_pre);
-    foreach my $task (@$tasklist) {
-	my $vmid = $task->{vmid};
-	my $log = $task->{tmplog};
-	if (!$log) {
-	    $text_log_part .= "$vmid: no log available\n\n";
-	    next;
-	}
-	if (open (my $TMP, '<', "$log")) {
-	    while (my $line = <$TMP>) {
-		next if $line =~ /^status: \d+/; # not useful in mails
-		$text_log_part .= encode8bit ("$vmid: $line");
-	    }
-	    close ($TMP);
-	} else {
-	    $text_log_part .= "$vmid: Could not open log file\n\n";
-	}
-	$text_log_part .= "\n";
-    }
-    $text_log_part .= $detail_post if defined($detail_post);
+Total running time: {{duration total-time}}
 
-    # html part
-    my $html = "<html><body>\n";
-    $html .= "<p>" . (escape_html($err) =~ s/\n/<br>/gr) . "</p>\n" if $err;
-    $html .= "<table border=1 cellpadding=3>\n";
-    $html .= "<tr><td>VMID<td>NAME<td>STATUS<td>TIME<td>SIZE<td>FILENAME</tr>\n";
+{{heading-1 "Logs"}}
+{{verbatim-monospaced logs}}
+EOT
 
-    my $ssize = 0;
-    foreach my $task (@$tasklist) {
-	my $vmid = $task->{vmid};
-	my $name = $task->{hostname};
-
-	if  ($task->{state} eq 'ok') {
-	    $ssize += $task->{size};
-
-	    $html .= sprintf (
-	        "<tr><td>%s<td>%s<td>OK<td>%s<td align=right>%s<td>%s</tr>\n",
-	        $vmid,
-	        $name,
-	        format_time($task->{backuptime}),
-	        format_size ($task->{size}),
-	        escape_html ($task->{target}),
-	    );
-	} else {
-	    $html .= sprintf (
-	        "<tr><td>%s<td>%s<td><font color=red>FAILED<td>%s<td colspan=2>%s</tr>\n",
-	        $vmid,
-	        $name,
-	        format_time($task->{backuptime}),
-	        escape_html ($task->{msg}),
-	    );
-	}
-    }
+use constant MAX_LOG_SIZE => 1024*1024;
 
-    $html .= sprintf ("<tr><td align=left colspan=3>TOTAL<td>%s<td>%s<td></tr>",
- format_time ($totaltime), format_size ($ssize));
+sub send_notification {
+    my ($self, $tasklist, $total_time, $err, $detail_pre, $detail_post) = @_;
 
-    $html .= "\n</table><br><br>\n";
-    my $html_log_part;
-    $html_log_part .= "Detailed backup logs:<br /><br />\n";
-    $html_log_part .= "<pre>\n";
-    $html_log_part .= escape_html($cmdline) . "\n\n";
+    my $opts = $self->{opts};
+    my $mailto = $opts->{mailto};
+    my $cmdline = $self->{cmdline};
+    my $target = $opts->{"notification-target"};
+    # Fall back to 'mailnotification' if 'notification-policy' is not set.
+    # If both are set, 'notification-policy' takes precedence
+    my $policy = $opts->{"notification-policy"} // $opts->{mailnotification} // 'always';
 
-    $html_log_part .= escape_html($detail_pre) . "\n" if defined($detail_pre);
-    foreach my $task (@$tasklist) {
-	my $vmid = $task->{vmid};
-	my $log = $task->{tmplog};
-	if (!$log) {
-	    $html_log_part .= "$vmid: no log available\n\n";
-	    next;
-	}
-	if (open (my $TMP, '<', "$log")) {
-	    while (my $line = <$TMP>) {
-		next if $line =~ /^status: \d+/; # not useful in mails
-		if ($line =~ m/^\S+\s\d+\s+\d+:\d+:\d+\s+(ERROR|WARN):/) {
-		    $html_log_part .= encode8bit ("$vmid: <font color=red>".
-			escape_html ($line) . "</font>");
-		} else {
-		    $html_log_part .= encode8bit ("$vmid: " . escape_html ($line));
-		}
-	    }
-	    close ($TMP);
+    return if ($policy eq 'never');
+
+    sanitize_task_list($tasklist);
+    my $error_count = count_failed_tasks($tasklist);
+
+    my $failed = ($error_count || $err);
+
+    return if (!$failed && ($policy eq 'failure'));
+
+    my $status_text = $failed ? 'backup failed' : 'backup successful';
+
+    if ($err) {
+	if ($err =~ /\n/) {
+	    $status_text .= ": multiple problems";
 	} else {
-	    $html_log_part .= "$vmid: Could not open log file\n\n";
+	    $status_text .= ": $err";
+	    $err = undef;
 	}
-	$html_log_part .= "\n";
     }
-    $html_log_part .= escape_html($detail_post) if defined($detail_post);
-    $html_log_part .= "</pre>";
-    my $html_end = "\n</body></html>\n";
-    # end html part
-
-    if (length($text) + length($text_log_part) +
-	length($html) + length($html_log_part) +
-	length($html_end) < MAX_MAIL_SIZE)
+
+    my $text_log_part = "$cmdline\n\n";
+    $text_log_part .= $detail_pre . "\n" if defined($detail_pre);
+    $text_log_part .= read_backup_task_logs($tasklist);
+    $text_log_part .= $detail_post if defined($detail_post);
+
+    if (length($text_log_part)  > MAX_LOG_SIZE)
     {
-	$html .= $html_log_part;
-	$html .= $html_end;
-	$text .= $text_log_part;
-    } else {
-	my $msg = "Log output was too long to be sent by mail. ".
+	# Let's limit the maximum length of included logs
+	$text_log_part = "Log output was too long to be sent. ".
 	    "See Task History for details!\n";
-	$text .= $msg;
-	$html .= "<p>$msg</p>";
-	$html .= $html_end;
+    };
+
+    my $notification_props = {
+	"hostname"      => get_hostname(),
+	"error-message" => $err,
+	"guest-table"   => build_guest_table($tasklist),
+	"logs"          => $text_log_part,
+	"status-text"   => $status_text,
+	"total-time"    => $total_time,
+    };
+
+    my $notification_config = PVE::Notify::read_config();
+
+    if ($mailto && scalar(@$mailto)) {
+	# <, >, @ is not allowed in endpoint names, but only it is only
+	# verified once the config is serialized. That means that
+	# we can rely on that fact that no other endpoint with this name exists.
+	my $endpoint_name = "mail-to-<" . join(",", @$mailto) . ">";
+	$notification_config->add_sendmail_endpoint(
+	    $endpoint_name,
+	    $mailto,
+	    undef,
+	    undef,
+	    "vzdump backup tool");
+
+	my $endpoints = [$endpoint_name];
+
+	# Create an anonymous group containing the sendmail endpoint and the
+	# $target endpoint, if specified
+	if ($target) {
+	    push @$endpoints, $target;
+	}
+
+	$target = "group-$endpoint_name";
+	$notification_config->add_group(
+	    $target,
+	    $endpoints,
+	);
     }
 
-    my $subject = "vzdump backup status ($hostname) : $stat";
+    return if (!$target);
 
-    my $dcconf = PVE::Cluster::cfs_read_file('datacenter.cfg');
-    my $mailfrom = $dcconf->{email_from} || "root";
+    my $severity = $failed ? "error" : "info";
 
-    PVE::Tools::sendmail($mailto, $subject, $text, $html, $mailfrom, "vzdump backup tool");
+    PVE::Notify::notify(
+	$target,
+	$severity,
+	$subject_template,
+	$body_template,
+	$notification_props,
+	$notification_config
+    );
 };
 
 sub new {
@@ -632,7 +671,7 @@ sub new {
     }
 
     if ($errors) {
-	eval { $self->sendmail([], 0, $errors); };
+	eval { $self->send_notification([], 0, $errors); };
 	debugmsg ('err', $@) if $@;
 	die "$errors\n";
     }
@@ -1322,11 +1361,11 @@ sub exec_backup {
     my $totaltime = time() - $starttime;
 
     eval {
-	# otherwise $self->sendmail() will interpret it as multiple problems
+	# otherwise $self->send_notification() will interpret it as multiple problems
 	my $chomped_err = $err;
 	chomp($chomped_err) if $chomped_err;
 
-	$self->sendmail(
+	$self->send_notification(
 	    $tasklist,
 	    $totaltime,
 	    $chomped_err,
diff --git a/test/mail_test.pl b/test/mail_test.pl
index d0114441..0635ebb7 100755
--- a/test/mail_test.pl
+++ b/test/mail_test.pl
@@ -5,7 +5,7 @@ use warnings;
 
 use lib '..';
 
-use Test::More tests => 5;
+use Test::More tests => 3;
 use Test::MockModule;
 
 use PVE::VZDump;
@@ -29,17 +29,19 @@ sub prepare_mail_with_status {
 sub prepare_long_mail {
     open(TEST_FILE, '>', $TEST_FILE_PATH); # Removes previous content
     # 0.5 MB * 2 parts + the overview tables gives more than 1 MB mail
-    print TEST_FILE "a" x (1024*1024/2);
+    print TEST_FILE "a" x (1024*1024);
     close(TEST_FILE);
 }
 
-my ($result_text, $result_html);
+my $result_text;
+my $result_properties;
+
+my $mock_notification_module = Test::MockModule->new('PVE::Notify');
+$mock_notification_module->mock('send_notification', sub {
+    my ($channel, $severity, $title, $text, $properties) = @_;
 
-my $mock_tools_module = Test::MockModule->new('PVE::Tools');
-$mock_tools_module->mock('sendmail', sub {
-    my (undef, undef, $text, $html, undef, undef) = @_;
     $result_text = $text;
-    $result_html = $html;
+    $result_properties = $properties;
 });
 
 my $mock_cluster_module = Test::MockModule->new('PVE::Cluster');
@@ -47,7 +49,9 @@ $mock_cluster_module->mock('cfs_read_file', sub {
     my $path = shift;
 
     if ($path eq 'datacenter.cfg') {
-	return {};
+        return {};
+    } elsif ($path eq 'notifications.cfg' || $path eq 'priv/notifications.cfg') {
+        return '';
     } else {
 	die "unexpected cfs_read_file\n";
     }
@@ -62,28 +66,26 @@ my $SELF = {
 my $task = { state => 'ok', vmid => '100', };
 my $tasklist;
 sub prepare_test {
-    $result_text = $result_html = undef;
+    $result_text = undef;
     $task->{tmplog} = shift;
     $tasklist = [ $task ];
 }
 
 {
     prepare_test($TEST_FILE_WRONG_PATH);
-    PVE::VZDump::sendmail($SELF, $tasklist, 0, undef, undef, undef);
-    like($result_text, $NO_LOGFILE, "Missing logfile is detected");
+    PVE::VZDump::send_notification($SELF, $tasklist, 0, undef, undef, undef);
+    like($result_properties->{logs}, $NO_LOGFILE, "Missing logfile is detected");
 }
 {
     prepare_test($TEST_FILE_PATH);
     prepare_mail_with_status();
-    PVE::VZDump::sendmail($SELF, $tasklist, 0, undef, undef, undef);
-    unlike($result_text, $STATUS, "Status are not in text part of mails");
-    unlike($result_html, $STATUS, "Status are not in HTML part of mails");
+    PVE::VZDump::send_notification($SELF, $tasklist, 0, undef, undef, undef);
+    unlike($result_properties->{"status-text"}, $STATUS, "Status are not in text part of mails");
 }
 {
     prepare_test($TEST_FILE_PATH);
     prepare_long_mail();
-    PVE::VZDump::sendmail($SELF, $tasklist, 0, undef, undef, undef);
-    like($result_text, $LOG_TOO_LONG, "Text part of mails gets shortened");
-    like($result_html, $LOG_TOO_LONG, "HTML part of mails gets shortened");
+    PVE::VZDump::send_notification($SELF, $tasklist, 0, undef, undef, undef);
+    like($result_properties->{logs}, $LOG_TOO_LONG, "Text part of mails gets shortened");
 }
 unlink $TEST_FILE_PATH;
-- 
2.39.2





  parent reply	other threads:[~2023-07-17 15:10 UTC|newest]

Thread overview: 114+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 14:59 [pve-devel] [PATCH v3 many 00/66] fix #4156: introduce new notification system Lukas Wagner
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 01/66] add proxmox-notify crate Lukas Wagner
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 02/66] notify: preparation for the first endpoint plugin Lukas Wagner
2023-07-17 15:48   ` Maximiliano Sandoval
2023-07-18  7:19     ` Lukas Wagner
2023-07-18 10:13       ` Wolfgang Bumiller
2023-07-18 11:54   ` Wolfgang Bumiller
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 03/66] notify: preparation for the API Lukas Wagner
2023-07-18 12:02   ` Wolfgang Bumiller
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 04/66] notify: api: add API for sending notifications/testing endpoints Lukas Wagner
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 05/66] notify: add sendmail plugin Lukas Wagner
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 06/66] notify: api: add API for sendmail endpoints Lukas Wagner
2023-07-18 12:36   ` Wolfgang Bumiller
2023-07-19 11:51     ` Lukas Wagner
2023-07-19 12:09       ` Wolfgang Bumiller
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 07/66] notify: add gotify endpoint Lukas Wagner
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 08/66] notify: api: add API for gotify endpoints Lukas Wagner
2023-07-18 12:44   ` Wolfgang Bumiller
2023-07-18 13:19     ` Lukas Wagner
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 09/66] notify: add notification groups Lukas Wagner
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 10/66] notify: api: add API for groups Lukas Wagner
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 11/66] notify: add notification filter mechanism Lukas Wagner
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 12/66] notify: api: add API for filters Lukas Wagner
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 13/66] notify: add template rendering Lukas Wagner
2023-07-17 14:59 ` [pve-devel] [PATCH v3 proxmox 14/66] notify: add example for " Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox 15/66] notify: add context Lukas Wagner
2023-07-18 12:57   ` Wolfgang Bumiller
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox 16/66] notify: sendmail: allow users as recipients Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox 17/66] notify: sendmail: query default author/mailfrom from context Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox 18/66] notify: gotify: add proxy support Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox 19/66] notify: api: allow to query entities referenced by filter/target Lukas Wagner
2023-07-18 13:02   ` Wolfgang Bumiller
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox 20/66] notify: on deletion, check if a filter/endp. is still used by anything Lukas Wagner
2023-07-18 13:20   ` Wolfgang Bumiller
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox 21/66] notify: ensure that filter/group/endpoint names are unique Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox 22/66] notify: additional logging when sending a notification Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox 23/66] notify: add debian packaging Lukas Wagner
2023-07-18 13:25   ` Wolfgang Bumiller
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-perl-rs 24/66] add PVE::RS::Notify module Lukas Wagner
2023-07-19 10:10   ` Wolfgang Bumiller
2023-07-19 10:23     ` Wolfgang Bumiller
2023-07-19 10:37       ` Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-perl-rs 25/66] notify: add api for sending notifications/testing endpoints Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-perl-rs 26/66] notify: add api for notification groups Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-perl-rs 27/66] notify: add api for sendmail endpoints Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-perl-rs 28/66] notify: add api for gotify endpoints Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-perl-rs 29/66] notify: add api for notification filters Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-perl-rs 30/66] notify: sendmail: support the `mailto-user` parameter Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-perl-rs 31/66] notify: implement context for getting default author/mailfrom Lukas Wagner
2023-07-19 11:15   ` Wolfgang Bumiller
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-perl-rs 32/66] notify: add context for getting http_proxy from datacenter.cfg Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-perl-rs 33/66] notify: add wrapper for `get_referenced_entities` Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-cluster 34/66] cluster files: add notifications.cfg Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-cluster 35/66] datacenter: add APT/fencing/replication notification configuration Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-cluster 36/66] add libpve-notify-perl package Lukas Wagner
2023-07-19 12:27   ` Wolfgang Bumiller
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-guest-common 37/66] vzdump: add config options for new notification backend Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-common 38/66] JSONSchema: increase maxLength of config-digest to 64 Lukas Wagner
2023-07-19 12:31   ` Wolfgang Bumiller
2023-07-19 12:41   ` Fiona Ebner
2023-07-19 12:49     ` Wolfgang Bumiller
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-ha-manager 39/66] manager: send notifications via new notification module Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 40/66] test: fix names of .PHONY targets Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 41/66] d/control: add dependency to `libpve-notify-perl` Lukas Wagner
2023-07-17 15:00 ` Lukas Wagner [this message]
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 43/66] test: rename mail_test.pl to vzdump_notification_test.pl Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 44/66] api: apt: send notification via new notification module Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 45/66] api: replication: send notifications " Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 46/66] api: prepare api handler module for notification config Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 47/66] api: notification: add api routes for groups Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 48/66] api: notification: add api routes for sendmail endpoints Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 49/66] api: notification: add api routes for gotify endpoints Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 50/66] api: notification: add api routes for filters Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 51/66] api: notification: allow fetching notification targets Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 52/66] api: notification: allow to test targets Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 53/66] api: notification: disallow removing targets if they are used Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 54/66] ui: backup: allow to select notification target for jobs Lukas Wagner
2023-07-19 12:20   ` Dominik Csapak
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 55/66] ui: backup: adapt backup job details to new notification params Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 56/66] ui: backup: allow to set notification-target for one-off backups Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 57/66] ui: allow to configure notification event -> target mapping Lukas Wagner
2023-07-19 12:45   ` Dominik Csapak
2023-07-19 15:25     ` Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 58/66] ui: add notification target configuration panel Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 59/66] ui: perm path: load notification target/filter acl entries Lukas Wagner
2023-07-19 12:53   ` Dominik Csapak
2023-07-20  7:46     ` Lukas Wagner
2023-07-20  7:54       ` Dominik Csapak
2023-07-20  8:22         ` Lukas Wagner
2023-07-20  8:29           ` Fiona Ebner
2023-07-20  9:26             ` Maximiliano Sandoval
2023-07-20 15:02               ` Thomas Lamprecht
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-manager 60/66] ui: perm path: increase width of the perm path selector combobox Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-widget-toolkit 61/66] notification: add gui for sendmail notification endpoints Lukas Wagner
2023-07-19 13:25   ` Dominik Csapak
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-widget-toolkit 62/66] notification: add gui for gotify " Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-widget-toolkit 63/66] notification: add gui for notification groups Lukas Wagner
2023-07-19 13:32   ` Dominik Csapak
2023-07-20 12:31     ` Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-widget-toolkit 64/66] notification: allow to select filter for notification targets Lukas Wagner
2023-07-17 15:00 ` [pve-devel] [PATCH v3 proxmox-widget-toolkit 65/66] notification: add ui for managing notification filters Lukas Wagner
2023-07-19 13:53   ` Dominik Csapak
2023-07-17 15:00 ` [pve-devel] [PATCH v3 pve-docs 66/66] add documentation for the new notification system Lukas Wagner
2023-07-18 12:34 ` [pve-devel] [PATCH v3 many 00/66] fix #4156: introduce " Dominik Csapak
2023-07-18 13:14   ` Lukas Wagner
2023-07-18 13:58     ` Dominik Csapak
2023-07-18 14:07       ` Lukas Wagner
2023-07-18 14:37   ` Thomas Lamprecht
2023-07-19 13:13     ` Lukas Wagner
2023-07-19  8:40   ` Lukas Wagner
2023-07-19  9:54     ` Wolfgang Bumiller
2023-07-18 13:27 ` Wolfgang Bumiller
2023-07-19 12:11 ` Wolfgang Bumiller
2023-07-19 12:17   ` Lukas Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230717150051.710464-43-l.wagner@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal