[PATCH v2 00/11] Enabling logging for ch guests

Praveen K Paladugu posted 11 patches 1 year, 1 month ago
Failed in applying to current master (apply log)
po/POTFILES                                   |  2 +-
src/ch/ch_conf.c                              |  1 +
src/ch/ch_conf.h                              |  2 +
src/ch/ch_monitor.c                           | 84 ++++++++++++-------
src/ch/ch_monitor.h                           |  6 +-
src/ch/ch_process.c                           | 36 ++++++--
.../domain_logcontext.c}                      | 78 +++++++++--------
src/hypervisor/domain_logcontext.h            | 45 ++++++++++
src/hypervisor/meson.build                    |  1 +
src/libvirt_private.syms                      |  6 ++
src/qemu/meson.build                          |  1 -
src/qemu/qemu_domain.c                        | 28 +++----
src/qemu/qemu_domain.h                        | 12 +--
src/qemu/qemu_logcontext.h                    | 41 ---------
src/qemu/qemu_nbdkit.c                        | 12 ++-
src/qemu/qemu_process.c                       | 45 +++++-----
16 files changed, 236 insertions(+), 164 deletions(-)
rename src/{qemu/qemu_logcontext.c => hypervisor/domain_logcontext.c} (79%)
create mode 100644 src/hypervisor/domain_logcontext.h
delete mode 100644 src/qemu/qemu_logcontext.h
[PATCH v2 00/11] Enabling logging for ch guests
Posted by Praveen K Paladugu 1 year, 1 month ago
LogContext management is now moved from Qemu driver to hypervisor. After
migrating Qemu to use domain_logcontext, I extended ch driver to use also use
domain_logcontext to capture early boot failures within domain specific log
files.

Changes in V2:
* refactored the patches to ensure all of them build.
* ch driver will use virtlogd to consolidate logs from hypervisor and its
  domains.

Praveen K Paladugu (11):
  hypervisor: copy qemu log context mgmt to hypervisor
  hypervisor: rename reference to qemu in domain_logcontext
  hypervisor: drop qemu specific args in domainLogContextNew
  hypervisor: Build domain_logcontext
  libvirt_private: export symbols from domain_logcontext
  qemu: Modify qemu driver to use domainLogContext
  qemu: delete qemu_logcontext files
  ch: Enable logging for ch domains
  ch: move curl_data and curl_callback definitions
  ch: Enable logging curl responses from ch
  ch: configure ch driver to use virlogd

 po/POTFILES                                   |  2 +-
 src/ch/ch_conf.c                              |  1 +
 src/ch/ch_conf.h                              |  2 +
 src/ch/ch_monitor.c                           | 84 ++++++++++++-------
 src/ch/ch_monitor.h                           |  6 +-
 src/ch/ch_process.c                           | 36 ++++++--
 .../domain_logcontext.c}                      | 78 +++++++++--------
 src/hypervisor/domain_logcontext.h            | 45 ++++++++++
 src/hypervisor/meson.build                    |  1 +
 src/libvirt_private.syms                      |  6 ++
 src/qemu/meson.build                          |  1 -
 src/qemu/qemu_domain.c                        | 28 +++----
 src/qemu/qemu_domain.h                        | 12 +--
 src/qemu/qemu_logcontext.h                    | 41 ---------
 src/qemu/qemu_nbdkit.c                        | 12 ++-
 src/qemu/qemu_process.c                       | 45 +++++-----
 16 files changed, 236 insertions(+), 164 deletions(-)
 rename src/{qemu/qemu_logcontext.c => hypervisor/domain_logcontext.c} (79%)
 create mode 100644 src/hypervisor/domain_logcontext.h
 delete mode 100644 src/qemu/qemu_logcontext.h

-- 
2.47.0
Re: [PATCH v2 00/11] Enabling logging for ch guests
Posted by Michal Prívozník via Devel 5 months, 3 weeks ago
On 12/19/24 18:07, Praveen K Paladugu wrote:
> LogContext management is now moved from Qemu driver to hypervisor. After
> migrating Qemu to use domain_logcontext, I extended ch driver to use also use
> domain_logcontext to capture early boot failures within domain specific log
> files.
> 
> Changes in V2:
> * refactored the patches to ensure all of them build.
> * ch driver will use virtlogd to consolidate logs from hypervisor and its
>   domains.
> 
> Praveen K Paladugu (11):
>   hypervisor: copy qemu log context mgmt to hypervisor
>   hypervisor: rename reference to qemu in domain_logcontext
>   hypervisor: drop qemu specific args in domainLogContextNew
>   hypervisor: Build domain_logcontext
>   libvirt_private: export symbols from domain_logcontext
>   qemu: Modify qemu driver to use domainLogContext
>   qemu: delete qemu_logcontext files
>   ch: Enable logging for ch domains
>   ch: move curl_data and curl_callback definitions
>   ch: Enable logging curl responses from ch
>   ch: configure ch driver to use virlogd
> 
>  po/POTFILES                                   |  2 +-
>  src/ch/ch_conf.c                              |  1 +
>  src/ch/ch_conf.h                              |  2 +
>  src/ch/ch_monitor.c                           | 84 ++++++++++++-------
>  src/ch/ch_monitor.h                           |  6 +-
>  src/ch/ch_process.c                           | 36 ++++++--
>  .../domain_logcontext.c}                      | 78 +++++++++--------
>  src/hypervisor/domain_logcontext.h            | 45 ++++++++++
>  src/hypervisor/meson.build                    |  1 +
>  src/libvirt_private.syms                      |  6 ++
>  src/qemu/meson.build                          |  1 -
>  src/qemu/qemu_domain.c                        | 28 +++----
>  src/qemu/qemu_domain.h                        | 12 +--
>  src/qemu/qemu_logcontext.h                    | 41 ---------
>  src/qemu/qemu_nbdkit.c                        | 12 ++-
>  src/qemu/qemu_process.c                       | 45 +++++-----
>  16 files changed, 236 insertions(+), 164 deletions(-)
>  rename src/{qemu/qemu_logcontext.c => hypervisor/domain_logcontext.c} (79%)
>  create mode 100644 src/hypervisor/domain_logcontext.h
>  delete mode 100644 src/qemu/qemu_logcontext.h
> 

Is this still something you're interested in? I mean, I've just merged a
patch that allows CH driver to parse a config file. So that might be
used to configure logging for CH driver. If so, can you please rebase
and resend?

Michal
Re: [PATCH v2 00/11] Enabling logging for ch guests
Posted by Praveen Paladugu 5 months, 3 weeks ago
Hey Michal,

Thanks for the follow up. I noticed the new patchset. The new patchset
builds on top of the one I sent.

My patchset enables support for capturing logs from ch domains to
the standard libvirt path at /var/log/libvirt/ch_<domain_name>.log.
The new patchset enables verbosity knobs on top of my patchset.

Also the patchset I sent was already merged by you in Dec 24. I don't
have any follow up work for logging support.

Please let me know if I missed anything or misunderstood your assk.

Regards,
Praveen


On Mon, Aug 18, 2025 at 8:50 AM Michal Prívozník <mprivozn@redhat.com>
wrote:

> On 12/19/24 18:07, Praveen K Paladugu wrote:
> > LogContext management is now moved from Qemu driver to hypervisor. After
> > migrating Qemu to use domain_logcontext, I extended ch driver to use
> also use
> > domain_logcontext to capture early boot failures within domain specific
> log
> > files.
> >
> > Changes in V2:
> > * refactored the patches to ensure all of them build.
> > * ch driver will use virtlogd to consolidate logs from hypervisor and its
> >   domains.
> >
> > Praveen K Paladugu (11):
> >   hypervisor: copy qemu log context mgmt to hypervisor
> >   hypervisor: rename reference to qemu in domain_logcontext
> >   hypervisor: drop qemu specific args in domainLogContextNew
> >   hypervisor: Build domain_logcontext
> >   libvirt_private: export symbols from domain_logcontext
> >   qemu: Modify qemu driver to use domainLogContext
> >   qemu: delete qemu_logcontext files
> >   ch: Enable logging for ch domains
> >   ch: move curl_data and curl_callback definitions
> >   ch: Enable logging curl responses from ch
> >   ch: configure ch driver to use virlogd
> >
> >  po/POTFILES                                   |  2 +-
> >  src/ch/ch_conf.c                              |  1 +
> >  src/ch/ch_conf.h                              |  2 +
> >  src/ch/ch_monitor.c                           | 84 ++++++++++++-------
> >  src/ch/ch_monitor.h                           |  6 +-
> >  src/ch/ch_process.c                           | 36 ++++++--
> >  .../domain_logcontext.c}                      | 78 +++++++++--------
> >  src/hypervisor/domain_logcontext.h            | 45 ++++++++++
> >  src/hypervisor/meson.build                    |  1 +
> >  src/libvirt_private.syms                      |  6 ++
> >  src/qemu/meson.build                          |  1 -
> >  src/qemu/qemu_domain.c                        | 28 +++----
> >  src/qemu/qemu_domain.h                        | 12 +--
> >  src/qemu/qemu_logcontext.h                    | 41 ---------
> >  src/qemu/qemu_nbdkit.c                        | 12 ++-
> >  src/qemu/qemu_process.c                       | 45 +++++-----
> >  16 files changed, 236 insertions(+), 164 deletions(-)
> >  rename src/{qemu/qemu_logcontext.c => hypervisor/domain_logcontext.c}
> (79%)
> >  create mode 100644 src/hypervisor/domain_logcontext.h
> >  delete mode 100644 src/qemu/qemu_logcontext.h
> >
>
> Is this still something you're interested in? I mean, I've just merged a
> patch that allows CH driver to parse a config file. So that might be
> used to configure logging for CH driver. If so, can you please rebase
> and resend?
>
> Michal
>
>
Re: [PATCH v2 00/11] Enabling logging for ch guests
Posted by Daniel P. Berrangé via Devel 5 months, 3 weeks ago
On Mon, Aug 18, 2025 at 09:58:32AM -0500, Praveen Paladugu wrote:
> Hey Michal,
> 
> Thanks for the follow up. I noticed the new patchset. The new patchset
> builds on top of the one I sent.
> 
> My patchset enables support for capturing logs from ch domains to
> the standard libvirt path at /var/log/libvirt/ch_<domain_name>.log.

NB This should really use a /var/log/libvirt/ch/  sub-directory to
match behaivour of the other drivers wrt per-VM log file location.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Re: [PATCH v2 00/11] Enabling logging for ch guests
Posted by Praveen Paladugu 5 months, 3 weeks ago
Daniel,

The log files are actually created under /var/log/libvirt/ch/
sub-directory. Seems like
I made a typo in my previous email.

/var/log/libvirt/ch/ch_<domain_name>.log is the logfile name.

Praveen




On Mon, Aug 18, 2025 at 10:02 AM Daniel P. Berrangé <berrange@redhat.com>
wrote:

> On Mon, Aug 18, 2025 at 09:58:32AM -0500, Praveen Paladugu wrote:
> > Hey Michal,
> >
> > Thanks for the follow up. I noticed the new patchset. The new patchset
> > builds on top of the one I sent.
> >
> > My patchset enables support for capturing logs from ch domains to
> > the standard libvirt path at /var/log/libvirt/ch_<domain_name>.log.
>
> NB This should really use a /var/log/libvirt/ch/  sub-directory to
> match behaivour of the other drivers wrt per-VM log file location.
>
> With regards,
> Daniel
> --
> |: https://berrange.com      -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-
> https://www.instagram.com/dberrange :|
>
>
Re: [PATCH v2 00/11] Enabling logging for ch guests
Posted by Daniel P. Berrangé via Devel 5 months, 3 weeks ago
On Mon, Aug 18, 2025 at 10:53:09AM -0500, Praveen Paladugu wrote:
> Daniel,
> 
> The log files are actually created under /var/log/libvirt/ch/
> sub-directory. Seems like
> I made a typo in my previous email.
> 
> /var/log/libvirt/ch/ch_<domain_name>.log is the logfile name.

Ok, adding the 'ch_' prefix to the filename is redundant and
can be dropped.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|