[libvirt] [PATCH 3/4] logd: add support for admin protocol in virtlogd

Daniel P. Berrange berrange at redhat.com
Mon Jan 22 15:47:47 UTC 2018


On Mon, Jan 22, 2018 at 04:44:13PM +0100, Michal Privoznik wrote:
> On 01/19/2018 06:09 PM, Daniel P. Berrange wrote:
> > Add a virtlogd-admin-sock can serves the admin protocol for the virtlogd
> > daemon and define a virtlogd:///{system,session}  URI scheme for
> > connecting to it.
> > 
> > Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> > ---
> >  src/Makefile.am                      |   1 +
> >  src/libvirt-admin.c                  |  20 ++++--
> >  src/logging/log_daemon.c             | 135 ++++++++++++++++++++++++++---------
> >  src/logging/log_daemon_config.c      |   3 +
> >  src/logging/log_daemon_config.h      |   1 +
> >  src/logging/test_virtlogd.aug.in     |   4 ++
> >  src/logging/virtlogd-admin.socket.in |  10 +++
> >  src/logging/virtlogd.aug             |   1 +
> >  src/logging/virtlogd.service.in      |   1 +
> >  9 files changed, 136 insertions(+), 40 deletions(-)
> >  create mode 100644 src/logging/virtlogd-admin.socket.in
> > 
> 
> 
> > diff --git a/src/logging/log_daemon_config.c b/src/logging/log_daemon_config.c
> > index cf58e6230e..3226b2c484 100644
> > --- a/src/logging/log_daemon_config.c
> > +++ b/src/logging/log_daemon_config.c
> > @@ -73,6 +73,7 @@ virLogDaemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
> >          return NULL;
> >  
> >      data->max_clients = 1024;
> > +    data->admin_max_clients = 5000;
> >      data->max_size = 1024 * 1024 * 2;
> >      data->max_backups = 3;
> 
> 5000 seems like huge default. Perhaps 5 is enough? Or 10 so that we
> match the value from the aug test. Which brigns up interesting question
> - how come we don't need src/logging/virtlogd.conf change too? And also,
> how can it be that the aug test doesn't test virtlogd.conf but some
> crafted input? We should have something similar to qemu.conf test.

5000 was blindly copied from libvirtd - it is odd that it doesn't match
the default listed in the ocnfig file there too.

I'll see about fixing the aug test to work like libvirtd's test does.


BTW, other flaw in this patch is that I've broken exec-restarts....

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 :|




More information about the libvir-list mailing list