- build: Bump minimum glib2 version to 2.66.0 (RHEL-77884) - qemuProcessHandleIOError: Refactor to extract 'priv' instead of 'driver' (RHEL-77884) - qemu: Handle quirks of 'device' field of BLOCK_IO_ERROR event in monitor code (RHEL-77884) - qemu: Rename 'diskAlias' to 'device' in qemu IO error event handling (RHEL-77884) - qemuProcessHandleIOError: Rename local variables (RHEL-77884) - qemuMonitorJSONHandleIOError: Do not munge 'reason' field of IO error event (RHEL-77884) - qemuProcessHandleIOError: Prefer lookup by node name (RHEL-77884) - qemuMonitorJSONHandleIOError: Propagate new 'qom-path' field (RHEL-77884) - virStorageSource: Add fields for storing last I/O error message (RHEL-77884) - qemuProcessHandleIOError: Populate I/O error reason to virStorageSource (RHEL-77884) - qemuProcessHandleIOError: Log IO errors in the VM log file (RHEL-77884) - libxlDomainGetMessages: Add existing flags to 'virCheckFlags' (RHEL-77884) - virDomainObjGetMessages: Refactor using GPtrArray (RHEL-77884) - virDomainGetMessages: Introduce VIR_DOMAIN_MESSAGE_IOERRORS (RHEL-77884) - include: libvirt-domain: Reword documentation for @reason of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON (RHEL-77884) - include: libvirt-domain: Add 'message' @reason of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON (RHEL-77884) - qemuSnapshotForEachQcow2: Don't initialize 'nrollback' (RHEL-73315) - qemu: process: Export qemuPrepareNVRAM for use in snapshot code (RHEL-73315) - qemu: snapshot: Ensure that NVRAM image exists when taking inactive internal snapshot (RHEL-73315) - qemuxmlconftest: Allow testing of the 'writable' flag for passed FDs for disks (RHEL-37519) - qemuxmlconftest: Add testing of FDs with 'writable' flag in 'disk-source-fd' (RHEL-37519) - qemu: domain: Initialize FD passthrough for a virStorageSource before using it (RHEL-37519) Resolves: RHEL-37519, RHEL-73315, RHEL-77884
49 lines
2.0 KiB
Diff
49 lines
2.0 KiB
Diff
From 0ad096e3448a2b6e366995220f4266af34dd9010 Mon Sep 17 00:00:00 2001
|
|
Message-ID: <0ad096e3448a2b6e366995220f4266af34dd9010.1738940191.git.jdenemar@redhat.com>
|
|
From: Peter Krempa <pkrempa@redhat.com>
|
|
Date: Fri, 24 Jan 2025 17:01:34 +0100
|
|
Subject: [PATCH] qemuProcessHandleIOError: Log IO errors in the VM log file
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Add a log entry to the VM log file for every time we receive an IO error
|
|
event from qemu. The log entry is as follows:
|
|
|
|
2025-01-24 16:03:28.928+0000: IO error device='virtio-disk0' node-name='libvirt-1-storage' reason='other: Input/output error'
|
|
|
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
(cherry picked from commit 18f8d572be4caaa0c55a8d68a4048ef2360a03c5)
|
|
|
|
https://issues.redhat.com/browse/RHEL-77884
|
|
---
|
|
src/qemu/qemu_process.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
index 6b8a2af4ed..409734d948 100644
|
|
--- a/src/qemu/qemu_process.c
|
|
+++ b/src/qemu/qemu_process.c
|
|
@@ -829,7 +829,7 @@ qemuProcessHandleIOError(qemuMonitor *mon G_GNUC_UNUSED,
|
|
const char *nodename,
|
|
int action,
|
|
bool nospace,
|
|
- const char *reason G_GNUC_UNUSED)
|
|
+ const char *reason)
|
|
{
|
|
qemuDomainObjPrivate *priv;
|
|
virObjectEvent *ioErrorEvent = NULL;
|
|
@@ -867,6 +867,9 @@ qemuProcessHandleIOError(qemuMonitor *mon G_GNUC_UNUSED,
|
|
ioErrorEvent2 = virDomainEventIOErrorReasonNewFromObj(vm, eventPath, eventAlias, action, eventReason);
|
|
|
|
if ((timestamp = virTimeStringNow()) != NULL) {
|
|
+ qemuDomainLogAppendMessage(priv->driver, vm, "%s: IO error device='%s' node-name='%s' reason='%s'\n",
|
|
+ timestamp, NULLSTR(eventAlias), NULLSTR(nodename), NULLSTR(reason));
|
|
+
|
|
if (src) {
|
|
g_free(src->ioerror_timestamp);
|
|
g_free(src->ioerror_message);
|
|
--
|
|
2.48.1
|