Bug 1847867
Summary: | RFE: pass through block job error message to clients using a new block job completed event | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | yisun |
Component: | libvirt | Assignee: | Virtualization Maintenance <virt-maint> |
libvirt sub component: | General | QA Contact: | yisun |
Status: | CLOSED WONTFIX | Docs Contact: | |
Severity: | low | ||
Priority: | low | CC: | jsuchane, nsoffer, pkrempa, virt-maint, yisun |
Version: | 9.0 | Keywords: | Automation, FutureFeature, Triaged |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-12-17 07:26:59 UTC | Type: | Feature Request |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
yisun
2020-06-17 09:06:16 UTC
There are two problems: 1) the 'error:' empty line is printed by virsh which hints there might be an error message missing. This is a bug in the virsh code which uses wrong function to print the "Copy failed" message, which should not be prefixed by a 'error:'. I'll post a patch dealing with this. 2) there is no way to get the actual error message using the existing infrastructure. 'virsh' can't report the eroror because the existing libvirt events for block job completion don't have any field to transport the error, and blockjobs which have completed in any way can't also be queried using the existing APIs. This means we need either a new libvirt event or a completely new way to handle block jobs which will allow reporting the error or querying a job after it has finished. This is far more work. I'm thus re-purposing the summary to track this second part. Both of the problems described above are present for a very long time. Returning detailed error to clients would be awesome. This will make it easy to debug issues in clients. For example, in RHV, we sometimes get an even like: 2021-03-07 16:01:30,859+0200 ERROR (libvirt/events) [virt.vm] (vmId='5652e2ca-9006-4657-8895-0551deda5b9a') Block job 36ca3e55-8902-4508-8937-fc991cdb316b type ACTIVE_COMMIT for drive sdb has failed (vm:5597) To understand why the job failed, you need to go to libvirt log, but this log does not contain any info about this error - because the error is logged in info level, in this message: 2021-03-07 14:01:30.842+0000: 53531: info : qemuMonitorJSONIOProcessLine:235 : QEMU_MONITOR_RECV_EVENT: mon=0x7f3b9805f030 event={"timestamp": {"seconds": 1615125690, "microseconds": 842235}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "commit-sdb-libvirt-7-format", "len": 2147483648, "offset": 1072693248, "speed": 0, "type": "commit", "error": "No space left on device"}} Info level messages are usually disabled because libvirt log too verbose. For example 80% of the log are messages about object life time like: 2021-03-07 14:01:30.842+0000: 53531: info : virObjectRef:402 : OBJECT_REF: obj=0x7f3b9805f030 We can filter out such messages, but this looks like a debugging message that should be logged in debug level. I think the simplest way to fix this issue quickly is to check qemu reply, and log block job failures in error or warning level, so they are always logged. Even if we have a way to pass the error info the the client using events, logging the error on libvirt side is good idea, since the client may loose the event. Bulk update: Move RHEL-AV bugs to RHEL9. If necessary to resolve in RHEL8, then clone to the current RHEL8 release. After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. |