On 3/25/19 9:04 AM, Bjoern Walk wrote:
> This patch series introduces the ability to save additional information
> for the domain state and exposes this information in virsh domstate.
>
> For example in the case of QEMU guest panic events, we can provide additional
> information like the crash reason or register state of the domain. This
> information usually gets logged in the domain log but for debugging it is
> useful to have it accessible from the client. Therefore, let's introduce a new
> public API function, virDomainGetStateParams, an extensible version of
> virDomainGetState, which returns the complete state of the domain, including
> newly introduced additional information.
>
> Let's also extend virsh domstate and introduce a new parameter --info to show
> the domain state, reason and additional information when available.
>
> virsh domstate --info guest1
> crashed (panicked: s390: core='1' psw-mask='0x1234000000000000' \
> psw-addr='0x0000000000001234' reason='disabled-wait')
>
> Previous version is here:
>
> https://www.redhat.com/archives/libvir-list/2018-July/msg00686.html
>
> v1 -> v2:
> * refactored the public API according to discussions to provide a
> more machine-parsable interface
>
> Bjoern Walk (7):
> qemu: monitor: move event data structure to domain
> qemu: domain: store and update panic info
> lib: introduce virDomainGetStateParams function
> remote: implement remoteDomainGetStateParams
> qemu: implement qemuDomainGetStateParams
> virsh: domstate: report detailed state if available
> news: add entry for virDomainGetStateParams
>
> docs/news.xml | 11 +++
> include/libvirt/libvirt-domain.h | 76 +++++++++++++++++
> src/driver-hypervisor.h | 9 ++
> src/libvirt-domain.c | 64 ++++++++++++++
> src/libvirt_public.syms | 1 +
> src/qemu/qemu_domain.c | 89 +++++++++++++++++++-
> src/qemu/qemu_domain.h | 47 +++++++++++
> src/qemu/qemu_driver.c | 126 +++++++++++++++++++++++++++-
> src/qemu/qemu_monitor.c | 53 +-----------
> src/qemu/qemu_monitor.h | 48 ++---------
> src/qemu/qemu_monitor_json.c | 20 ++---
> src/qemu/qemu_process.c | 2 +-
> src/remote/remote_daemon_dispatch.c | 50 +++++++++++
> src/remote/remote_driver.c | 44 ++++++++++
> src/remote/remote_protocol.x | 22 ++++-
> src/remote_protocol-structs | 12 +++
> tools/virsh-domain-monitor.c | 102 +++++++++++++++++++---
> tools/virsh.pod | 5 +-
> 18 files changed, 658 insertions(+), 123 deletions(-)
>
I like the general idea, but some cleanups are needed IMO.
Michal
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list