[libvirt] [PATCH] remote: remove obsolete params from sysconf file

Daniel P. Berrangé posted 1 patch 4 years, 9 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190703131455.25778-1-berrange@redhat.com
src/remote/libvirtd.sysconf | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
[libvirt] [PATCH] remote: remove obsolete params from sysconf file
Posted by Daniel P. Berrangé 4 years, 9 months ago
The LIBVIRTD_CONFIG and LIBVIRTD_NOFILES_LIMIT parameters were only
honoured when using the sysvinit scripts. This was removed already in

      commit 912fe2df9d8628b2f3d54485f1cb919cb124d07a
      Author: Andrea Bolognani <abologna@redhat.com>
      Date:   Fri Mar 15 16:47:27 2019 +0100

        Drop support for "Red Hat" init scripts

so the parameters can safely be dropped.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/remote/libvirtd.sysconf | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/src/remote/libvirtd.sysconf b/src/remote/libvirtd.sysconf
index f15e5956eb..60a47c252f 100644
--- a/src/remote/libvirtd.sysconf
+++ b/src/remote/libvirtd.sysconf
@@ -1,8 +1,4 @@
-# Override the default config file
-# NOTE: This setting is no longer honoured if using
-# systemd. Set '--config /etc/libvirt/libvirtd.conf'
-# in LIBVIRTD_ARGS instead.
-#LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
+# Customizations for the libvirtd.service systemd unit
 
 # Listen for TCP/IP connections
 # NB. must setup TLS/SSL keys prior to using this
@@ -19,15 +15,3 @@
 #QEMU_AUDIO_DRV=sdl
 #
 #SDL_AUDIODRIVER=pulse
-
-# Override the maximum number of opened files.
-# This only works with traditional init scripts.
-# In the systemd world, the limit can only be changed by overriding
-# LimitNOFILE for libvirtd.service. To do that, just create a *.conf
-# file in /etc/systemd/system/libvirtd.service.d/ (for example
-# /etc/systemd/system/libvirtd.service.d/openfiles.conf) and write
-# the following two lines in it:
-#   [Service]
-#   LimitNOFILE=2048
-#
-#LIBVIRTD_NOFILES_LIMIT=2048
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] remote: remove obsolete params from sysconf file
Posted by Jiri Denemark 4 years, 9 months ago
On Wed, Jul 03, 2019 at 14:14:55 +0100, Daniel P. Berrangé wrote:
> The LIBVIRTD_CONFIG and LIBVIRTD_NOFILES_LIMIT parameters were only
> honoured when using the sysvinit scripts. This was removed already in
> 
>       commit 912fe2df9d8628b2f3d54485f1cb919cb124d07a
>       Author: Andrea Bolognani <abologna@redhat.com>
>       Date:   Fri Mar 15 16:47:27 2019 +0100
> 
>         Drop support for "Red Hat" init scripts
> 
> so the parameters can safely be dropped.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  src/remote/libvirtd.sysconf | 18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
> 
> diff --git a/src/remote/libvirtd.sysconf b/src/remote/libvirtd.sysconf
> index f15e5956eb..60a47c252f 100644
> --- a/src/remote/libvirtd.sysconf
> +++ b/src/remote/libvirtd.sysconf
> @@ -1,8 +1,4 @@
> -# Override the default config file
> -# NOTE: This setting is no longer honoured if using
> -# systemd. Set '--config /etc/libvirt/libvirtd.conf'
> -# in LIBVIRTD_ARGS instead.
> -#LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
> +# Customizations for the libvirtd.service systemd unit
>  
>  # Listen for TCP/IP connections
>  # NB. must setup TLS/SSL keys prior to using this
> @@ -19,15 +15,3 @@
>  #QEMU_AUDIO_DRV=sdl
>  #
>  #SDL_AUDIODRIVER=pulse
> -
> -# Override the maximum number of opened files.
> -# This only works with traditional init scripts.
> -# In the systemd world, the limit can only be changed by overriding
> -# LimitNOFILE for libvirtd.service. To do that, just create a *.conf
> -# file in /etc/systemd/system/libvirtd.service.d/ (for example
> -# /etc/systemd/system/libvirtd.service.d/openfiles.conf) and write
> -# the following two lines in it:
> -#   [Service]
> -#   LimitNOFILE=2048

I think this hint on how to customize the option with systemd is quite
helpful and we should keep it.

Jirka

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] remote: remove obsolete params from sysconf file
Posted by Daniel P. Berrangé 4 years, 9 months ago
On Wed, Jul 03, 2019 at 03:35:46PM +0200, Jiri Denemark wrote:
> On Wed, Jul 03, 2019 at 14:14:55 +0100, Daniel P. Berrangé wrote:
> > The LIBVIRTD_CONFIG and LIBVIRTD_NOFILES_LIMIT parameters were only
> > honoured when using the sysvinit scripts. This was removed already in
> > 
> >       commit 912fe2df9d8628b2f3d54485f1cb919cb124d07a
> >       Author: Andrea Bolognani <abologna@redhat.com>
> >       Date:   Fri Mar 15 16:47:27 2019 +0100
> > 
> >         Drop support for "Red Hat" init scripts
> > 
> > so the parameters can safely be dropped.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >  src/remote/libvirtd.sysconf | 18 +-----------------
> >  1 file changed, 1 insertion(+), 17 deletions(-)
> > 
> > diff --git a/src/remote/libvirtd.sysconf b/src/remote/libvirtd.sysconf
> > index f15e5956eb..60a47c252f 100644
> > --- a/src/remote/libvirtd.sysconf
> > +++ b/src/remote/libvirtd.sysconf
> > @@ -1,8 +1,4 @@
> > -# Override the default config file
> > -# NOTE: This setting is no longer honoured if using
> > -# systemd. Set '--config /etc/libvirt/libvirtd.conf'
> > -# in LIBVIRTD_ARGS instead.
> > -#LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
> > +# Customizations for the libvirtd.service systemd unit
> >  
> >  # Listen for TCP/IP connections
> >  # NB. must setup TLS/SSL keys prior to using this
> > @@ -19,15 +15,3 @@
> >  #QEMU_AUDIO_DRV=sdl
> >  #
> >  #SDL_AUDIODRIVER=pulse
> > -
> > -# Override the maximum number of opened files.
> > -# This only works with traditional init scripts.
> > -# In the systemd world, the limit can only be changed by overriding
> > -# LimitNOFILE for libvirtd.service. To do that, just create a *.conf
> > -# file in /etc/systemd/system/libvirtd.service.d/ (for example
> > -# /etc/systemd/system/libvirtd.service.d/openfiles.conf) and write
> > -# the following two lines in it:
> > -#   [Service]
> > -#   LimitNOFILE=2048
> 
> I think this hint on how to customize the option with systemd is quite
> helpful and we should keep it.

We already have a LimitNOFILE set in the libvirtd.service doc.
Overriding the service defaults is covered by systemd docs in
general & doesn't need repeating by libvirt.

My desire is to ultimately kill the  sysconf file entirely
but I've not yet got a nice story for upgrades where
someone has used sysconf to add the --listen arg. In fact
I'd like to kill the --listen arg too, but again not figured
out a nice upgrade story yet.

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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] remote: remove obsolete params from sysconf file
Posted by Jiri Denemark 4 years, 9 months ago
On Wed, Jul 03, 2019 at 14:57:50 +0100, Daniel P. Berrangé wrote:
> On Wed, Jul 03, 2019 at 03:35:46PM +0200, Jiri Denemark wrote:
> > On Wed, Jul 03, 2019 at 14:14:55 +0100, Daniel P. Berrangé wrote:
> > > The LIBVIRTD_CONFIG and LIBVIRTD_NOFILES_LIMIT parameters were only
> > > honoured when using the sysvinit scripts. This was removed already in
> > > 
> > >       commit 912fe2df9d8628b2f3d54485f1cb919cb124d07a
> > >       Author: Andrea Bolognani <abologna@redhat.com>
> > >       Date:   Fri Mar 15 16:47:27 2019 +0100
> > > 
> > >         Drop support for "Red Hat" init scripts
> > > 
> > > so the parameters can safely be dropped.
> > > 
> > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > > ---
> > >  src/remote/libvirtd.sysconf | 18 +-----------------
> > >  1 file changed, 1 insertion(+), 17 deletions(-)
> > > 
> > > diff --git a/src/remote/libvirtd.sysconf b/src/remote/libvirtd.sysconf
> > > index f15e5956eb..60a47c252f 100644
> > > --- a/src/remote/libvirtd.sysconf
> > > +++ b/src/remote/libvirtd.sysconf
> > > @@ -1,8 +1,4 @@
> > > -# Override the default config file
> > > -# NOTE: This setting is no longer honoured if using
> > > -# systemd. Set '--config /etc/libvirt/libvirtd.conf'
> > > -# in LIBVIRTD_ARGS instead.
> > > -#LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
> > > +# Customizations for the libvirtd.service systemd unit
> > >  
> > >  # Listen for TCP/IP connections
> > >  # NB. must setup TLS/SSL keys prior to using this
> > > @@ -19,15 +15,3 @@
> > >  #QEMU_AUDIO_DRV=sdl
> > >  #
> > >  #SDL_AUDIODRIVER=pulse
> > > -
> > > -# Override the maximum number of opened files.
> > > -# This only works with traditional init scripts.
> > > -# In the systemd world, the limit can only be changed by overriding
> > > -# LimitNOFILE for libvirtd.service. To do that, just create a *.conf
> > > -# file in /etc/systemd/system/libvirtd.service.d/ (for example
> > > -# /etc/systemd/system/libvirtd.service.d/openfiles.conf) and write
> > > -# the following two lines in it:
> > > -#   [Service]
> > > -#   LimitNOFILE=2048
> > 
> > I think this hint on how to customize the option with systemd is quite
> > helpful and we should keep it.
> 
> We already have a LimitNOFILE set in the libvirtd.service doc.

OK, which means the hint would go there, but...

> Overriding the service defaults is covered by systemd docs in
> general & doesn't need repeating by libvirt.

you're right. I remember it was not so easy to find the right way of
overriding the settings for a systemd service at the time I wrote this
hint. Also it was meant as an upgrade path. But, I just tried to search
for this and found the right answer pretty quickly.

Thus,

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

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