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

Bjoern Walk posted 7 patches 11 weeks ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190325080457.74609-1-bwalk@linux.ibm.com
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(-)

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

Posted by Bjoern Walk 11 weeks ago
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(-)

-- 
2.17.0

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

Re: [libvirt] [PATCH v2 0/7] extend virsh domstate to show additional information

Posted by Michal Privoznik 11 weeks ago
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

Re: [libvirt] [PATCH v2 0/7] extend virsh domstate to show additional information

Posted by Bjoern Walk 11 weeks ago
Michal Privoznik <mprivozn@redhat.com> [2019-03-27, 02:05PM +0100]:
> I like the general idea, but some cleanups are needed IMO.

Fair enough. I will send the next rebased version then after the
release.

> 
> Michal
> 

Thanks for the review.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 0/7] extend virsh domstate to show additional information

Posted by Bjoern Walk 11 weeks ago
Bjoern Walk <bwalk@linux.ibm.com> [2019-03-25, 09:04AM +0100]:
> 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')

Any chance we might squeeze this one in before the freeze?
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list