all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server v2 3/3] blockdev: avoid potentially misleading error messages when block job monitor fails
Date: Thu, 12 Feb 2026 16:36:24 +0100	[thread overview]
Message-ID: <20260212153638.476233-4-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260212153638.476233-1-f.ebner@proxmox.com>

The monitor() function can also fail at different times than during
completion. If it fails during completion, the error message will
already indicate that. Finally, the error messages already indicate
the job type or ID, so no information is lost by getting rid of the
added prefix.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

New in v2.

 src/PVE/QemuServer/Blockdev.pm | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/PVE/QemuServer/Blockdev.pm b/src/PVE/QemuServer/Blockdev.pm
index be9f588a..5846ac69 100644
--- a/src/PVE/QemuServer/Blockdev.pm
+++ b/src/PVE/QemuServer/Blockdev.pm
@@ -1085,12 +1085,7 @@ sub blockdev_commit {
         # 'block-commit' will complete automatically.
         my $complete = $src_snap && $src_snap ne 'current' ? 'auto' : 'complete';
 
-        eval {
-            PVE::QemuServer::BlockJob::monitor($vmid, undef, $jobs, $complete, 0, 'commit');
-        };
-        if ($@) {
-            die "Failed to complete block commit: $@\n";
-        }
+        PVE::QemuServer::BlockJob::monitor($vmid, undef, $jobs, $complete, 0, 'commit');
 
         blockdev_delete(
             $storecfg, $vmid, $drive, $src_file_blockdev, $src_fmt_blockdev, $src_snap,
@@ -1164,10 +1159,7 @@ sub blockdev_stream {
     mon_cmd($vmid, 'block-stream', %$options);
     $jobs->{$job_id} = {};
 
-    eval { PVE::QemuServer::BlockJob::monitor($vmid, undef, $jobs, 'auto', 0, 'stream'); };
-    if ($@) {
-        die "Failed to complete block stream: $@\n";
-    }
+    PVE::QemuServer::BlockJob::monitor($vmid, undef, $jobs, 'auto', 0, 'stream');
 
     blockdev_delete($storecfg, $vmid, $drive, $snap_file_blockdev, $snap_fmt_blockdev, $snap);
 }
-- 
2.47.3





  parent reply	other threads:[~2026-02-12 15:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12 15:36 [PATCH-SERIES qemu-server v2 0/3] small block job related improvements Fiona Ebner
2026-02-12 15:36 ` [PATCH qemu-server v2 1/3] blockdev: commit: improve comment about completion mode Fiona Ebner
2026-02-12 15:36 ` [PATCH qemu-server v2 2/3] block job: rename qemu_drive_mirror_monitor() to monitor() Fiona Ebner
2026-02-12 15:36 ` Fiona Ebner [this message]
2026-02-13 16:55 ` superseded: [PATCH-SERIES qemu-server v2 0/3] small block job related improvements Fiona Ebner

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=20260212153638.476233-4-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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal