[pve-devel] [PATCH-SERIES qemu-server 0/3] qmp: improve error handling for mon_cmd()

Fiona Ebner f.ebner at proxmox.com
Tue Aug 5 11:25:30 CEST 2025


Add a new noerr argument to mon_cmd() to allow callers to opt-in to
handling errors themselves.

Without passing 'noerr' to mon_cmd(), errors are logged to the system
journal. In the blockdev module, in attach() and detach(), there are
two mon_cmd() calls that are expected to fail in some scenarios for
which the errors should not be logged.

Again in the blockdev module, the functions for deletion and replace
had the same issue. Have them re-use the detach() function.


Fiona Ebner (3):
  qmp client: add $noerr argument
  blockdev: attach/detach: silence errors for QMP commands for which
    failure may be expected
  blockdev: delete/replace: re-use detach() helper

 src/PVE/QMPClient.pm           |  8 ++++---
 src/PVE/QemuServer/Blockdev.pm | 14 +++++-------
 src/PVE/QemuServer/Monitor.pm  | 40 +++++++++++++++++++++++++++++++---
 3 files changed, 47 insertions(+), 15 deletions(-)

-- 
2.47.2





More information about the pve-devel mailing list