[PATCH v3 0/7] extend virsh domstate to show additional information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 guest-1
    crashed (panicked)
    s390.core     = 0
    s390.psw-mask = 0x0002000180000000
    s390.psw-addr = 0x000000000010f146
    s390.reason   = disabled-wait

v2 -> v3:
    * try to find a reasonable naming-scheme for parameters
    * make state/reason in virDomainGetStateParams optional
    * use new API only when requested
    * print additional information per line for easier consumption
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                |  62 ++++++++++++++
 src/libvirt_public.syms             |   5 ++
 src/qemu/qemu_domain.c              |  80 +++++++++++++++++-
 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          |  48 +++++++++++
 src/remote/remote_protocol.x        |  22 ++++-
 src/remote_protocol-structs         |  13 +++
 tools/virsh-domain-monitor.c        |  94 +++++++++++++++++++--
 tools/virsh.pod                     |   5 +-
 18 files changed, 651 insertions(+), 120 deletions(-)

-- 
2.19.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux