From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] vzdump: also warn when hook script fails for backup-abort or log-end phase
Date: Mon, 22 Jan 2024 10:55:21 +0100 [thread overview]
Message-ID: <20240122095521.23260-1-f.ebner@proxmox.com> (raw)
to make it more visible, also in task logs.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
PVE/VZDump.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 4185ed62..98641f5a 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -1269,6 +1269,7 @@ sub exec_backup_task {
debugmsg ('info', "Failed at " . strftime("%F %H:%M:%S", localtime()));
eval { $self->run_hook_script ('backup-abort', $task, $logfd); };
+ debugmsg('warn', $@) if $@; # message already contains command with phase name
} else {
$task->{state} = 'ok';
@@ -1300,6 +1301,7 @@ sub exec_backup_task {
}
eval { $self->run_hook_script ('log-end', $task); };
+ debugmsg('warn', $@) if $@; # message already contains command with phase name
die $err if $err && $err =~ m/^interrupted by signal$/;
}
--
2.39.2
next reply other threads:[~2024-01-22 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 9:55 Fiona Ebner [this message]
2024-04-23 14:48 ` [pve-devel] applied: " Thomas Lamprecht
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=20240122095521.23260-1-f.ebner@proxmox.com \
--to=f.ebner@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.