[libvirt PATCH v2 0/6] daemons: Improve timeout handling, plus some cleanups

Changes from [v1]: * move timeout setting from the service files to the sysconf files instead of the other way around; * remove obsolete KRB5_KTNAME override completely, including from OpenRC init scripts; * don't enable timeout for virtlogd, as it's not safe, and virtlockd, as it's probably safe but I messed this one up before so honestly why risk it. [v1] https://www.redhat.com/archives/libvir-list/2020-April/msg00030.html Andrea Bolognani (6): daemons: Support --timeout 0 systemd: Tweak existing sysconf files systemd: Add sysconf files for all daemons systemd: Move timeout from service files to sysconf files qemu: Allow audio driver override in virtqemud remote: Drop KRB5_KTNAME override libvirt.spec.in | 11 +++++++++++ src/interface/Makefile.inc.am | 2 ++ src/interface/virtinterfaced.service.in | 3 ++- src/interface/virtinterfaced.sysconf | 3 +++ src/libxl/Makefile.inc.am | 2 ++ src/libxl/virtxend.service.in | 3 ++- src/libxl/virtxend.sysconf | 3 +++ src/locking/lock_daemon.c | 6 +++--- src/locking/virtlockd.sysconf | 6 +++--- src/logging/log_daemon.c | 6 +++--- src/logging/virtlogd.sysconf | 6 +++--- src/lxc/Makefile.inc.am | 2 ++ src/lxc/virtlxcd.service.in | 3 ++- src/lxc/virtlxcd.sysconf | 3 +++ src/network/Makefile.inc.am | 2 ++ src/network/virtnetworkd.service.in | 3 ++- src/network/virtnetworkd.sysconf | 3 +++ src/node_device/Makefile.inc.am | 2 ++ src/node_device/virtnodedevd.service.in | 3 ++- src/node_device/virtnodedevd.sysconf | 3 +++ src/nwfilter/Makefile.inc.am | 2 ++ src/nwfilter/virtnwfilterd.service.in | 3 ++- src/nwfilter/virtnwfilterd.sysconf | 3 +++ src/qemu/Makefile.inc.am | 2 ++ src/qemu/virtqemud.service.in | 3 ++- src/qemu/virtqemud.sysconf | 12 ++++++++++++ src/remote/Makefile.inc.am | 5 ++++- src/remote/libvirtd.init.in | 1 - src/remote/libvirtd.sasl | 4 +--- src/remote/libvirtd.sysconf | 3 --- src/remote/remote_daemon.c | 6 +++--- src/remote/virtproxyd.init.in | 1 - src/remote/virtproxyd.service.in | 3 ++- src/remote/virtproxyd.sysconf | 3 +++ src/secret/Makefile.inc.am | 2 ++ src/secret/virtsecretd.service.in | 3 ++- src/secret/virtsecretd.sysconf | 3 +++ src/storage/Makefile.inc.am | 2 ++ src/storage/virtstoraged.service.in | 3 ++- src/storage/virtstoraged.sysconf | 3 +++ src/vbox/Makefile.inc.am | 2 ++ src/vbox/virtvboxd.service.in | 3 ++- src/vbox/virtvboxd.sysconf | 3 +++ src/vz/Makefile.inc.am | 2 ++ src/vz/virtvzd.service.in | 3 ++- src/vz/virtvzd.sysconf | 3 +++ tools/libvirt-guests.sysconf | 2 ++ 47 files changed, 124 insertions(+), 36 deletions(-) create mode 100644 src/interface/virtinterfaced.sysconf create mode 100644 src/libxl/virtxend.sysconf create mode 100644 src/lxc/virtlxcd.sysconf create mode 100644 src/network/virtnetworkd.sysconf create mode 100644 src/node_device/virtnodedevd.sysconf create mode 100644 src/nwfilter/virtnwfilterd.sysconf create mode 100644 src/qemu/virtqemud.sysconf create mode 100644 src/remote/virtproxyd.sysconf create mode 100644 src/secret/virtsecretd.sysconf create mode 100644 src/storage/virtstoraged.sysconf create mode 100644 src/vbox/virtvboxd.sysconf create mode 100644 src/vz/virtvzd.sysconf -- 2.25.1

When using systemd we want to take advantage of socket activation instead of keeping daemons running all the time, so we default to shutting them down after two minutes of inactivity. At the same time, we want it to be possible for the admin to opt out of this behavior and disable timeouts entirely. A very natural way to do so would be to specify a zero-length timeout, but that's currently not accepted by the command line parser. Address that. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/locking/lock_daemon.c | 6 +++--- src/logging/log_daemon.c | 6 +++--- src/remote/remote_daemon.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index 3d33995beb..4eff63014a 100644 --- a/src/locking/lock_daemon.c +++ b/src/locking/lock_daemon.c @@ -872,7 +872,7 @@ int main(int argc, char **argv) { int pid_file_fd = -1; char *sock_file = NULL; char *admin_sock_file = NULL; - int timeout = -1; /* -t: Shutdown timeout */ + int timeout = 0; /* -t: Shutdown timeout */ char *state_file = NULL; bool implicit_conf = false; mode_t old_umask; @@ -922,7 +922,7 @@ int main(int argc, char **argv) { case 't': if (virStrToLong_i(optarg, &tmp, 10, &timeout) != 0 - || timeout <= 0 + || timeout < 0 /* Ensure that we can multiply by 1000 without overflowing. */ || timeout > INT_MAX / 1000) { VIR_ERROR(_("Invalid value for timeout")); @@ -1123,7 +1123,7 @@ int main(int argc, char **argv) { adminSrv = virNetDaemonGetServer(lockDaemon->dmn, "admin"); } - if (timeout != -1) { + if (timeout > 0) { VIR_DEBUG("Registering shutdown timeout %d", timeout); virNetDaemonAutoShutdown(lockDaemon->dmn, timeout); diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c index dcafcda926..f37054706e 100644 --- a/src/logging/log_daemon.c +++ b/src/logging/log_daemon.c @@ -653,7 +653,7 @@ int main(int argc, char **argv) { int pid_file_fd = -1; char *sock_file = NULL; char *admin_sock_file = NULL; - int timeout = -1; /* -t: Shutdown timeout */ + int timeout = 0; /* -t: Shutdown timeout */ char *state_file = NULL; bool implicit_conf = false; mode_t old_umask; @@ -703,7 +703,7 @@ int main(int argc, char **argv) { case 't': if (virStrToLong_i(optarg, &tmp, 10, &timeout) != 0 - || timeout <= 0 + || timeout < 0 /* Ensure that we can multiply by 1000 without overflowing. */ || timeout > INT_MAX / 1000) { VIR_ERROR(_("Invalid value for timeout")); @@ -905,7 +905,7 @@ int main(int argc, char **argv) { adminSrv = virNetDaemonGetServer(logDaemon->dmn, "admin"); } - if (timeout != -1) { + if (timeout > 0) { VIR_DEBUG("Registering shutdown timeout %d", timeout); virNetDaemonAutoShutdown(logDaemon->dmn, timeout); diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index a1552800e9..7eec599177 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -770,7 +770,7 @@ int main(int argc, char **argv) { char *sock_file = NULL; char *sock_file_ro = NULL; char *sock_file_adm = NULL; - int timeout = -1; /* -t: Shutdown timeout */ + int timeout = 0; /* -t: Shutdown timeout */ int verbose = 0; int godaemon = 0; #ifdef WITH_IP @@ -844,7 +844,7 @@ int main(int argc, char **argv) { case 't': if (virStrToLong_i(optarg, &tmp, 10, &timeout) != 0 - || timeout <= 0 + || timeout < 0 /* Ensure that we can multiply by 1000 without overflowing. */ || timeout > INT_MAX / 1000) { VIR_ERROR(_("Invalid value for timeout")); @@ -1107,7 +1107,7 @@ int main(int argc, char **argv) { goto cleanup; } - if (timeout != -1) { + if (timeout > 0) { VIR_DEBUG("Registering shutdown timeout %d", timeout); virNetDaemonAutoShutdown(dmn, timeout); } -- 2.25.1

On Thu, Apr 02, 2020 at 07:14:26PM +0200, Andrea Bolognani wrote:
When using systemd we want to take advantage of socket activation instead of keeping daemons running all the time, so we default to shutting them down after two minutes of inactivity.
At the same time, we want it to be possible for the admin to opt out of this behavior and disable timeouts entirely. A very natural way to do so would be to specify a zero-length timeout, but that's currently not accepted by the command line parser. Address that.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/locking/lock_daemon.c | 6 +++--- src/logging/log_daemon.c | 6 +++--- src/remote/remote_daemon.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> 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 :|

We're going to add many more later, so start by adjusting the existing ones to more closely follow the example set by libvirtd. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- src/locking/virtlockd.sysconf | 6 +++--- src/logging/virtlogd.sysconf | 6 +++--- tools/libvirt-guests.sysconf | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/locking/virtlockd.sysconf b/src/locking/virtlockd.sysconf index d44dc464cd..03aea9e1bc 100644 --- a/src/locking/virtlockd.sysconf +++ b/src/locking/virtlockd.sysconf @@ -1,3 +1,3 @@ -# -# Pass extra arguments to virtlockd -#VIRTLOCKD_ARGS= +# Customizations for the virtlockd.service systemd unit + +VIRTLOCKD_ARGS="" diff --git a/src/logging/virtlogd.sysconf b/src/logging/virtlogd.sysconf index 5886f35110..67993e83ce 100644 --- a/src/logging/virtlogd.sysconf +++ b/src/logging/virtlogd.sysconf @@ -1,3 +1,3 @@ -# -# Pass extra arguments to virtlogd -#VIRTLOGD_ARGS= +# Customizations for the virtlogd.service systemd unit + +VIRTLOGD_ARGS="" diff --git a/tools/libvirt-guests.sysconf b/tools/libvirt-guests.sysconf index 669b046507..0765efec21 100644 --- a/tools/libvirt-guests.sysconf +++ b/tools/libvirt-guests.sysconf @@ -1,3 +1,5 @@ +# Customizations for the libvirt-guests.service systemd unit + # URIs to check for running guests # example: URIS='default xen:///system vbox+tcp://host/system lxc:///system' #URIS=default -- 2.25.1

On Thu, Apr 02, 2020 at 07:14:27PM +0200, Andrea Bolognani wrote:
We're going to add many more later, so start by adjusting the existing ones to more closely follow the example set by libvirtd.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- src/locking/virtlockd.sysconf | 6 +++--- src/logging/virtlogd.sysconf | 6 +++--- tools/libvirt-guests.sysconf | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> 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 :|

While not terribly useful in general, tweaking each daemon's timeout (or disabling it off altogether) is a valid use case which we can very easily support while being consistent with what already happens for libvirtd. This is a first step in that direction. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- libvirt.spec.in | 11 +++++++++++ src/interface/Makefile.inc.am | 2 ++ src/interface/virtinterfaced.service.in | 3 ++- src/interface/virtinterfaced.sysconf | 3 +++ src/libxl/Makefile.inc.am | 2 ++ src/libxl/virtxend.service.in | 3 ++- src/libxl/virtxend.sysconf | 3 +++ src/lxc/Makefile.inc.am | 2 ++ src/lxc/virtlxcd.service.in | 3 ++- src/lxc/virtlxcd.sysconf | 3 +++ src/network/Makefile.inc.am | 2 ++ src/network/virtnetworkd.service.in | 3 ++- src/network/virtnetworkd.sysconf | 3 +++ src/node_device/Makefile.inc.am | 2 ++ src/node_device/virtnodedevd.service.in | 3 ++- src/node_device/virtnodedevd.sysconf | 3 +++ src/nwfilter/Makefile.inc.am | 2 ++ src/nwfilter/virtnwfilterd.service.in | 3 ++- src/nwfilter/virtnwfilterd.sysconf | 3 +++ src/qemu/Makefile.inc.am | 2 ++ src/qemu/virtqemud.service.in | 3 ++- src/qemu/virtqemud.sysconf | 3 +++ src/remote/Makefile.inc.am | 5 ++++- src/remote/virtproxyd.service.in | 3 ++- src/remote/virtproxyd.sysconf | 3 +++ src/secret/Makefile.inc.am | 2 ++ src/secret/virtsecretd.service.in | 3 ++- src/secret/virtsecretd.sysconf | 3 +++ src/storage/Makefile.inc.am | 2 ++ src/storage/virtstoraged.service.in | 3 ++- src/storage/virtstoraged.sysconf | 3 +++ src/vbox/Makefile.inc.am | 2 ++ src/vbox/virtvboxd.service.in | 3 ++- src/vbox/virtvboxd.sysconf | 3 +++ src/vz/Makefile.inc.am | 2 ++ src/vz/virtvzd.service.in | 3 ++- src/vz/virtvzd.sysconf | 3 +++ 37 files changed, 97 insertions(+), 13 deletions(-) create mode 100644 src/interface/virtinterfaced.sysconf create mode 100644 src/libxl/virtxend.sysconf create mode 100644 src/lxc/virtlxcd.sysconf create mode 100644 src/network/virtnetworkd.sysconf create mode 100644 src/node_device/virtnodedevd.sysconf create mode 100644 src/nwfilter/virtnwfilterd.sysconf create mode 100644 src/qemu/virtqemud.sysconf create mode 100644 src/remote/virtproxyd.sysconf create mode 100644 src/secret/virtsecretd.sysconf create mode 100644 src/storage/virtstoraged.sysconf create mode 100644 src/vbox/virtvboxd.sysconf create mode 100644 src/vz/virtvzd.sysconf diff --git a/libvirt.spec.in b/libvirt.spec.in index efeeac31b9..6061a26497 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1532,6 +1532,7 @@ exit 0 %{_unitdir}/virtlockd.socket %{_unitdir}/virtlockd-admin.socket %config(noreplace) %{_sysconfdir}/sysconfig/libvirtd +%config(noreplace) %{_sysconfdir}/sysconfig/virtproxyd %config(noreplace) %{_sysconfdir}/sysconfig/virtlogd %config(noreplace) %{_sysconfdir}/sysconfig/virtlockd %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf @@ -1600,6 +1601,7 @@ exit 0 %ghost %{_sysconfdir}/libvirt/nwfilter/*.xml %files daemon-driver-interface +%config(noreplace) %{_sysconfdir}/sysconfig/virtinterfaced %config(noreplace) %{_sysconfdir}/libvirt/virtinterfaced.conf %{_datadir}/augeas/lenses/virtinterfaced.aug %{_datadir}/augeas/lenses/tests/test_virtinterfaced.aug @@ -1611,6 +1613,7 @@ exit 0 %{_libdir}/%{name}/connection-driver/libvirt_driver_interface.so %files daemon-driver-network +%config(noreplace) %{_sysconfdir}/sysconfig/virtnetworkd %config(noreplace) %{_sysconfdir}/libvirt/virtnetworkd.conf %{_datadir}/augeas/lenses/virtnetworkd.aug %{_datadir}/augeas/lenses/tests/test_virtnetworkd.aug @@ -1633,6 +1636,7 @@ exit 0 %endif %files daemon-driver-nodedev +%config(noreplace) %{_sysconfdir}/sysconfig/virtnodedevd %config(noreplace) %{_sysconfdir}/libvirt/virtnodedevd.conf %{_datadir}/augeas/lenses/virtnodedevd.aug %{_datadir}/augeas/lenses/tests/test_virtnodedevd.aug @@ -1644,6 +1648,7 @@ exit 0 %{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so %files daemon-driver-nwfilter +%config(noreplace) %{_sysconfdir}/sysconfig/virtnwfilterd %config(noreplace) %{_sysconfdir}/libvirt/virtnwfilterd.conf %{_datadir}/augeas/lenses/virtnwfilterd.aug %{_datadir}/augeas/lenses/tests/test_virtnwfilterd.aug @@ -1657,6 +1662,7 @@ exit 0 %{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so %files daemon-driver-secret +%config(noreplace) %{_sysconfdir}/sysconfig/virtsecretd %config(noreplace) %{_sysconfdir}/libvirt/virtsecretd.conf %{_datadir}/augeas/lenses/virtsecretd.aug %{_datadir}/augeas/lenses/tests/test_virtsecretd.aug @@ -1670,6 +1676,7 @@ exit 0 %files daemon-driver-storage %files daemon-driver-storage-core +%config(noreplace) %{_sysconfdir}/sysconfig/virtstoraged %config(noreplace) %{_sysconfdir}/libvirt/virtstoraged.conf %{_datadir}/augeas/lenses/virtstoraged.aug %{_datadir}/augeas/lenses/tests/test_virtstoraged.aug @@ -1726,6 +1733,7 @@ exit 0 %if %{with_qemu} %files daemon-driver-qemu +%config(noreplace) %{_sysconfdir}/sysconfig/virtqemud %config(noreplace) %{_sysconfdir}/libvirt/virtqemud.conf %{_datadir}/augeas/lenses/virtqemud.aug %{_datadir}/augeas/lenses/tests/test_virtqemud.aug @@ -1753,6 +1761,7 @@ exit 0 %if %{with_lxc} %files daemon-driver-lxc +%config(noreplace) %{_sysconfdir}/sysconfig/virtlxcd %config(noreplace) %{_sysconfdir}/libvirt/virtlxcd.conf %{_datadir}/augeas/lenses/virtlxcd.aug %{_datadir}/augeas/lenses/tests/test_virtlxcd.aug @@ -1774,6 +1783,7 @@ exit 0 %if %{with_libxl} %files daemon-driver-libxl +%config(noreplace) %{_sysconfdir}/sysconfig/virtxend %config(noreplace) %{_sysconfdir}/libvirt/virtxend.conf %{_datadir}/augeas/lenses/virtxend.aug %{_datadir}/augeas/lenses/tests/test_virtxend.aug @@ -1795,6 +1805,7 @@ exit 0 %if %{with_vbox} %files daemon-driver-vbox +%config(noreplace) %{_sysconfdir}/sysconfig/virtvboxd %config(noreplace) %{_sysconfdir}/libvirt/virtvboxd.conf %{_datadir}/augeas/lenses/virtvboxd.aug %{_datadir}/augeas/lenses/tests/test_virtvboxd.aug diff --git a/src/interface/Makefile.inc.am b/src/interface/Makefile.inc.am index 39157c0770..46a43e61db 100644 --- a/src/interface/Makefile.inc.am +++ b/src/interface/Makefile.inc.am @@ -61,6 +61,8 @@ virtinterfaced_CFLAGS = \ virtinterfaced_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) virtinterfaced_LDADD = $(REMOTE_DAEMON_LD_ADD) +SYSCONF_FILES += interface/virtinterfaced.sysconf + SYSTEMD_UNIT_FILES += \ virtinterfaced.service \ virtinterfaced.socket \ diff --git a/src/interface/virtinterfaced.service.in b/src/interface/virtinterfaced.service.in index ff3a611d16..4dbd7a627b 100644 --- a/src/interface/virtinterfaced.service.in +++ b/src/interface/virtinterfaced.service.in @@ -13,7 +13,8 @@ Documentation=https://libvirt.org [Service] Type=notify -ExecStart=@sbindir@/virtinterfaced --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced +ExecStart=@sbindir@/virtinterfaced --timeout 120 $VIRTINTERFACED_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/interface/virtinterfaced.sysconf b/src/interface/virtinterfaced.sysconf new file mode 100644 index 0000000000..c131f559d2 --- /dev/null +++ b/src/interface/virtinterfaced.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtinterfaced.service systemd unit + +VIRTINTERFACED_ARGS="" diff --git a/src/libxl/Makefile.inc.am b/src/libxl/Makefile.inc.am index ff6a2b0f69..619835a46b 100644 --- a/src/libxl/Makefile.inc.am +++ b/src/libxl/Makefile.inc.am @@ -73,6 +73,8 @@ virtxend_CFLAGS = \ virtxend_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) virtxend_LDADD = $(REMOTE_DAEMON_LD_ADD) +SYSCONF_FILES += libxl/virtxend.sysconf + SYSTEMD_UNIT_FILES += \ virtxend.service \ virtxend.socket \ diff --git a/src/libxl/virtxend.service.in b/src/libxl/virtxend.service.in index b4b6ce6d8c..8a794647ac 100644 --- a/src/libxl/virtxend.service.in +++ b/src/libxl/virtxend.service.in @@ -17,7 +17,8 @@ ConditionPathExists=/proc/xen/capabilities [Service] Type=notify -ExecStart=@sbindir@/virtxend --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtxend +ExecStart=@sbindir@/virtxend --timeout 120 $VIRTXEND_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure KillMode=process diff --git a/src/libxl/virtxend.sysconf b/src/libxl/virtxend.sysconf new file mode 100644 index 0000000000..7fa4b7b464 --- /dev/null +++ b/src/libxl/virtxend.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtxend.service systemd unit + +VIRTXEND_ARGS="" diff --git a/src/lxc/Makefile.inc.am b/src/lxc/Makefile.inc.am index 2fee607d3d..b8c2e1eb3d 100644 --- a/src/lxc/Makefile.inc.am +++ b/src/lxc/Makefile.inc.am @@ -136,6 +136,8 @@ virtlxcd_CFLAGS = \ virtlxcd_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) virtlxcd_LDADD = $(REMOTE_DAEMON_LD_ADD) +SYSCONF_FILES += lxc/virtlxcd.sysconf + SYSTEMD_UNIT_FILES += \ virtlxcd.service \ virtlxcd.socket \ diff --git a/src/lxc/virtlxcd.service.in b/src/lxc/virtlxcd.service.in index 33f8ca2d4d..0665f21ee0 100644 --- a/src/lxc/virtlxcd.service.in +++ b/src/lxc/virtlxcd.service.in @@ -18,7 +18,8 @@ Documentation=https://libvirt.org [Service] Type=notify -ExecStart=@sbindir@/virtlxcd --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd +ExecStart=@sbindir@/virtlxcd --timeout 120 $VIRTLXCD_ARGS ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure diff --git a/src/lxc/virtlxcd.sysconf b/src/lxc/virtlxcd.sysconf new file mode 100644 index 0000000000..d342aec88b --- /dev/null +++ b/src/lxc/virtlxcd.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtlxcd.service systemd unit + +VIRTLXCD_ARGS="" diff --git a/src/network/Makefile.inc.am b/src/network/Makefile.inc.am index bc05b01987..196a30e16c 100644 --- a/src/network/Makefile.inc.am +++ b/src/network/Makefile.inc.am @@ -69,6 +69,8 @@ virtnetworkd_CFLAGS = \ virtnetworkd_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) virtnetworkd_LDADD = $(REMOTE_DAEMON_LD_ADD) +SYSCONF_FILES += network/virtnetworkd.sysconf + SYSTEMD_UNIT_FILES += \ virtnetworkd.service \ virtnetworkd.socket \ diff --git a/src/network/virtnetworkd.service.in b/src/network/virtnetworkd.service.in index 656e8b4f84..beef277a34 100644 --- a/src/network/virtnetworkd.service.in +++ b/src/network/virtnetworkd.service.in @@ -13,7 +13,8 @@ Documentation=https://libvirt.org [Service] Type=notify -ExecStart=@sbindir@/virtnetworkd --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd +ExecStart=@sbindir@/virtnetworkd --timeout 120 $VIRTNETWORKD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure KillMode=process diff --git a/src/network/virtnetworkd.sysconf b/src/network/virtnetworkd.sysconf new file mode 100644 index 0000000000..fda82c1a76 --- /dev/null +++ b/src/network/virtnetworkd.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtnetworkd.service systemd unit + +VIRTNETWORKD_ARGS="" diff --git a/src/node_device/Makefile.inc.am b/src/node_device/Makefile.inc.am index 0b287189bc..788563665f 100644 --- a/src/node_device/Makefile.inc.am +++ b/src/node_device/Makefile.inc.am @@ -84,6 +84,8 @@ virtnodedevd_CFLAGS = \ virtnodedevd_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) virtnodedevd_LDADD = $(REMOTE_DAEMON_LD_ADD) +SYSCONF_FILES += node_device/virtnodedevd.sysconf + SYSTEMD_UNIT_FILES += \ virtnodedevd.service \ virtnodedevd.socket \ diff --git a/src/node_device/virtnodedevd.service.in b/src/node_device/virtnodedevd.service.in index 132ee05a7f..4795fc9167 100644 --- a/src/node_device/virtnodedevd.service.in +++ b/src/node_device/virtnodedevd.service.in @@ -13,7 +13,8 @@ Documentation=https://libvirt.org [Service] Type=notify -ExecStart=@sbindir@/virtnodedevd --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd +ExecStart=@sbindir@/virtnodedevd --timeout 120 $VIRTNODEDEVD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/node_device/virtnodedevd.sysconf b/src/node_device/virtnodedevd.sysconf new file mode 100644 index 0000000000..9ffea04634 --- /dev/null +++ b/src/node_device/virtnodedevd.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtnodedevd.service systemd unit + +VIRTNODEDEVD_ARGS="" diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am index 9a68fd80b6..20db8090e0 100644 --- a/src/nwfilter/Makefile.inc.am +++ b/src/nwfilter/Makefile.inc.am @@ -70,6 +70,8 @@ virtnwfilterd_CFLAGS = \ virtnwfilterd_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) virtnwfilterd_LDADD = $(REMOTE_DAEMON_LD_ADD) +SYSCONF_FILES += nwfilter/virtnwfilterd.sysconf + SYSTEMD_UNIT_FILES += \ virtnwfilterd.service \ virtnwfilterd.socket \ diff --git a/src/nwfilter/virtnwfilterd.service.in b/src/nwfilter/virtnwfilterd.service.in index 57c2fafe43..3517232edc 100644 --- a/src/nwfilter/virtnwfilterd.service.in +++ b/src/nwfilter/virtnwfilterd.service.in @@ -13,7 +13,8 @@ Documentation=https://libvirt.org [Service] Type=notify -ExecStart=@sbindir@/virtnwfilterd --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd +ExecStart=@sbindir@/virtnwfilterd --timeout 120 $VIRTNWFILTERD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/nwfilter/virtnwfilterd.sysconf b/src/nwfilter/virtnwfilterd.sysconf new file mode 100644 index 0000000000..4d46b6581a --- /dev/null +++ b/src/nwfilter/virtnwfilterd.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtnwfilterd.service systemd unit + +VIRTNWFILTERD_ARGS="" diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am index 51cd79879d..c42c470a4c 100644 --- a/src/qemu/Makefile.inc.am +++ b/src/qemu/Makefile.inc.am @@ -146,6 +146,8 @@ virtqemud_CFLAGS = \ virtqemud_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) virtqemud_LDADD = $(REMOTE_DAEMON_LD_ADD) +SYSCONF_FILES += qemu/virtqemud.sysconf + SYSTEMD_UNIT_FILES += \ virtqemud.service \ virtqemud.socket \ diff --git a/src/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in index aa24bdaab7..55a95640b1 100644 --- a/src/qemu/virtqemud.service.in +++ b/src/qemu/virtqemud.service.in @@ -18,7 +18,8 @@ Documentation=https://libvirt.org [Service] Type=notify -ExecStart=@sbindir@/virtqemud --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud +ExecStart=@sbindir@/virtqemud --timeout 120 $VIRTQEMUD_ARGS ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure diff --git a/src/qemu/virtqemud.sysconf b/src/qemu/virtqemud.sysconf new file mode 100644 index 0000000000..1bab275240 --- /dev/null +++ b/src/qemu/virtqemud.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtqemud.service systemd unit + +VIRTQEMUD_ARGS="" diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 958bd18f86..1b1be8340d 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -88,7 +88,10 @@ LOGROTATE_FILES_IN += \ remote/libvirtd.logrotate.in \ $(NULL) -SYSCONF_FILES += remote/libvirtd.sysconf +SYSCONF_FILES += \ + remote/libvirtd.sysconf \ + remote/virtproxyd.sysconf \ + $(NULL) LIBVIRTD_SOCKET_UNIT_FILES_IN = \ remote/libvirtd.socket.in \ diff --git a/src/remote/virtproxyd.service.in b/src/remote/virtproxyd.service.in index e99e2af19c..39d82bb53d 100644 --- a/src/remote/virtproxyd.service.in +++ b/src/remote/virtproxyd.service.in @@ -13,7 +13,8 @@ Documentation=https://libvirt.org [Service] Type=notify -ExecStart=@sbindir@/virtproxyd --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd +ExecStart=@sbindir@/virtproxyd --timeout 120 $VIRTPROXYD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/remote/virtproxyd.sysconf b/src/remote/virtproxyd.sysconf new file mode 100644 index 0000000000..805b6185b5 --- /dev/null +++ b/src/remote/virtproxyd.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtproxyd.service systemd unit + +VIRTPROXYD_ARGS="" diff --git a/src/secret/Makefile.inc.am b/src/secret/Makefile.inc.am index 63c8bc6dba..a8390f8265 100644 --- a/src/secret/Makefile.inc.am +++ b/src/secret/Makefile.inc.am @@ -47,6 +47,8 @@ virtsecretd_CFLAGS = \ virtsecretd_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) virtsecretd_LDADD = $(REMOTE_DAEMON_LD_ADD) +SYSCONF_FILES += secret/virtsecretd.sysconf + SYSTEMD_UNIT_FILES += \ virtsecretd.service \ virtsecretd.socket \ diff --git a/src/secret/virtsecretd.service.in b/src/secret/virtsecretd.service.in index 00cdc26b97..84f2001028 100644 --- a/src/secret/virtsecretd.service.in +++ b/src/secret/virtsecretd.service.in @@ -13,7 +13,8 @@ Documentation=https://libvirt.org [Service] Type=notify -ExecStart=@sbindir@/virtsecretd --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd +ExecStart=@sbindir@/virtsecretd --timeout 120 $VIRTSECRETD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/secret/virtsecretd.sysconf b/src/secret/virtsecretd.sysconf new file mode 100644 index 0000000000..9303dd7bcc --- /dev/null +++ b/src/secret/virtsecretd.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtsecretd.service systemd unit + +VIRTSECRETD_ARGS="" diff --git a/src/storage/Makefile.inc.am b/src/storage/Makefile.inc.am index 3655b8a53c..2f46d244f3 100644 --- a/src/storage/Makefile.inc.am +++ b/src/storage/Makefile.inc.am @@ -162,6 +162,8 @@ virtstoraged_CFLAGS = \ virtstoraged_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) virtstoraged_LDADD = $(REMOTE_DAEMON_LD_ADD) +SYSCONF_FILES += storage/virtstoraged.sysconf + SYSTEMD_UNIT_FILES += \ virtstoraged.service \ virtstoraged.socket \ diff --git a/src/storage/virtstoraged.service.in b/src/storage/virtstoraged.service.in index 9aa26764a9..a33fb289d5 100644 --- a/src/storage/virtstoraged.service.in +++ b/src/storage/virtstoraged.service.in @@ -15,7 +15,8 @@ Documentation=https://libvirt.org [Service] Type=notify -ExecStart=@sbindir@/virtstoraged --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged +ExecStart=@sbindir@/virtstoraged --timeout 120 $VIRTSTORAGED_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/storage/virtstoraged.sysconf b/src/storage/virtstoraged.sysconf new file mode 100644 index 0000000000..268d80b902 --- /dev/null +++ b/src/storage/virtstoraged.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtstoraged.service systemd unit + +VIRTSTORAGED_ARGS="" diff --git a/src/vbox/Makefile.inc.am b/src/vbox/Makefile.inc.am index 72a15c6468..8d2467f39e 100644 --- a/src/vbox/Makefile.inc.am +++ b/src/vbox/Makefile.inc.am @@ -81,6 +81,8 @@ virtvboxd_CFLAGS = \ virtvboxd_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) virtvboxd_LDADD = $(REMOTE_DAEMON_LD_ADD) +SYSCONF_FILES += vbox/virtvboxd.sysconf + SYSTEMD_UNIT_FILES += \ virtvboxd.service \ virtvboxd.socket \ diff --git a/src/vbox/virtvboxd.service.in b/src/vbox/virtvboxd.service.in index 7e0f7518d6..8240c45646 100644 --- a/src/vbox/virtvboxd.service.in +++ b/src/vbox/virtvboxd.service.in @@ -14,7 +14,8 @@ Documentation=https://libvirt.org [Service] Type=notify -ExecStart=@sbindir@/virtvboxd --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd +ExecStart=@sbindir@/virtvboxd --timeout 120 $VIRTVBOXD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/vbox/virtvboxd.sysconf b/src/vbox/virtvboxd.sysconf new file mode 100644 index 0000000000..a94c8ae23c --- /dev/null +++ b/src/vbox/virtvboxd.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtvboxd.service systemd unit + +VIRTVBOXD_ARGS="" diff --git a/src/vz/Makefile.inc.am b/src/vz/Makefile.inc.am index cabe18a9a1..f60f73bf06 100644 --- a/src/vz/Makefile.inc.am +++ b/src/vz/Makefile.inc.am @@ -56,6 +56,8 @@ virtvzd_CFLAGS = \ virtvzd_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS) virtvzd_LDADD = $(REMOTE_DAEMON_LD_ADD) +SYSCONF_FILES += vz/virtvzd.sysconf + SYSTEMD_UNIT_FILES += \ virtvzd.service \ virtvzd.socket \ diff --git a/src/vz/virtvzd.service.in b/src/vz/virtvzd.service.in index cd0f558768..15ccfeb172 100644 --- a/src/vz/virtvzd.service.in +++ b/src/vz/virtvzd.service.in @@ -14,7 +14,8 @@ Documentation=https://libvirt.org [Service] Type=notify -ExecStart=@sbindir@/virtvzd --timeout 120 +EnvironmentFile=-@sysconfdir@/sysconfig/virtvzd +ExecStart=@sbindir@/virtvzd --timeout 120 $VIRTVZD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/vz/virtvzd.sysconf b/src/vz/virtvzd.sysconf new file mode 100644 index 0000000000..7db30df94b --- /dev/null +++ b/src/vz/virtvzd.sysconf @@ -0,0 +1,3 @@ +# Customizations for the virtvzd.service systemd unit + +VIRTVZD_ARGS="" -- 2.25.1

On Thu, Apr 02, 2020 at 07:14:28PM +0200, Andrea Bolognani wrote:
While not terribly useful in general, tweaking each daemon's timeout (or disabling it off altogether) is a valid use case which we can very easily support while being consistent with what already happens for libvirtd. This is a first step in that direction.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- libvirt.spec.in | 11 +++++++++++ src/interface/Makefile.inc.am | 2 ++ src/interface/virtinterfaced.service.in | 3 ++- src/interface/virtinterfaced.sysconf | 3 +++ src/libxl/Makefile.inc.am | 2 ++ src/libxl/virtxend.service.in | 3 ++- src/libxl/virtxend.sysconf | 3 +++ src/lxc/Makefile.inc.am | 2 ++ src/lxc/virtlxcd.service.in | 3 ++- src/lxc/virtlxcd.sysconf | 3 +++ src/network/Makefile.inc.am | 2 ++ src/network/virtnetworkd.service.in | 3 ++- src/network/virtnetworkd.sysconf | 3 +++ src/node_device/Makefile.inc.am | 2 ++ src/node_device/virtnodedevd.service.in | 3 ++- src/node_device/virtnodedevd.sysconf | 3 +++ src/nwfilter/Makefile.inc.am | 2 ++ src/nwfilter/virtnwfilterd.service.in | 3 ++- src/nwfilter/virtnwfilterd.sysconf | 3 +++ src/qemu/Makefile.inc.am | 2 ++ src/qemu/virtqemud.service.in | 3 ++- src/qemu/virtqemud.sysconf | 3 +++ src/remote/Makefile.inc.am | 5 ++++- src/remote/virtproxyd.service.in | 3 ++- src/remote/virtproxyd.sysconf | 3 +++ src/secret/Makefile.inc.am | 2 ++ src/secret/virtsecretd.service.in | 3 ++- src/secret/virtsecretd.sysconf | 3 +++ src/storage/Makefile.inc.am | 2 ++ src/storage/virtstoraged.service.in | 3 ++- src/storage/virtstoraged.sysconf | 3 +++ src/vbox/Makefile.inc.am | 2 ++ src/vbox/virtvboxd.service.in | 3 ++- src/vbox/virtvboxd.sysconf | 3 +++ src/vz/Makefile.inc.am | 2 ++ src/vz/virtvzd.service.in | 3 ++- src/vz/virtvzd.sysconf | 3 +++ 37 files changed, 97 insertions(+), 13 deletions(-) create mode 100644 src/interface/virtinterfaced.sysconf create mode 100644 src/libxl/virtxend.sysconf create mode 100644 src/lxc/virtlxcd.sysconf create mode 100644 src/network/virtnetworkd.sysconf create mode 100644 src/node_device/virtnodedevd.sysconf create mode 100644 src/nwfilter/virtnwfilterd.sysconf create mode 100644 src/qemu/virtqemud.sysconf create mode 100644 src/remote/virtproxyd.sysconf create mode 100644 src/secret/virtsecretd.sysconf create mode 100644 src/storage/virtstoraged.sysconf create mode 100644 src/vbox/virtvboxd.sysconf create mode 100644 src/vz/virtvzd.sysconf
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> 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 :|

This follows the example set by libvirtd, and makes it easier for the admin to tweak the timeout or disable it altogether. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- src/interface/virtinterfaced.service.in | 2 +- src/interface/virtinterfaced.sysconf | 2 +- src/libxl/virtxend.service.in | 2 +- src/libxl/virtxend.sysconf | 2 +- src/lxc/virtlxcd.service.in | 2 +- src/lxc/virtlxcd.sysconf | 2 +- src/network/virtnetworkd.service.in | 2 +- src/network/virtnetworkd.sysconf | 2 +- src/node_device/virtnodedevd.service.in | 2 +- src/node_device/virtnodedevd.sysconf | 2 +- src/nwfilter/virtnwfilterd.service.in | 2 +- src/nwfilter/virtnwfilterd.sysconf | 2 +- src/qemu/virtqemud.service.in | 2 +- src/qemu/virtqemud.sysconf | 2 +- src/remote/virtproxyd.service.in | 2 +- src/remote/virtproxyd.sysconf | 2 +- src/secret/virtsecretd.service.in | 2 +- src/secret/virtsecretd.sysconf | 2 +- src/storage/virtstoraged.service.in | 2 +- src/storage/virtstoraged.sysconf | 2 +- src/vbox/virtvboxd.service.in | 2 +- src/vbox/virtvboxd.sysconf | 2 +- src/vz/virtvzd.service.in | 2 +- src/vz/virtvzd.sysconf | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/interface/virtinterfaced.service.in b/src/interface/virtinterfaced.service.in index 4dbd7a627b..73d409b81b 100644 --- a/src/interface/virtinterfaced.service.in +++ b/src/interface/virtinterfaced.service.in @@ -14,7 +14,7 @@ Documentation=https://libvirt.org [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced -ExecStart=@sbindir@/virtinterfaced --timeout 120 $VIRTINTERFACED_ARGS +ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/interface/virtinterfaced.sysconf b/src/interface/virtinterfaced.sysconf index c131f559d2..0685da31b8 100644 --- a/src/interface/virtinterfaced.sysconf +++ b/src/interface/virtinterfaced.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtinterfaced.service systemd unit -VIRTINTERFACED_ARGS="" +VIRTINTERFACED_ARGS="--timeout 120" diff --git a/src/libxl/virtxend.service.in b/src/libxl/virtxend.service.in index 8a794647ac..a863917467 100644 --- a/src/libxl/virtxend.service.in +++ b/src/libxl/virtxend.service.in @@ -18,7 +18,7 @@ ConditionPathExists=/proc/xen/capabilities [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtxend -ExecStart=@sbindir@/virtxend --timeout 120 $VIRTXEND_ARGS +ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure KillMode=process diff --git a/src/libxl/virtxend.sysconf b/src/libxl/virtxend.sysconf index 7fa4b7b464..301da47e8d 100644 --- a/src/libxl/virtxend.sysconf +++ b/src/libxl/virtxend.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtxend.service systemd unit -VIRTXEND_ARGS="" +VIRTXEND_ARGS="--timeout 120" diff --git a/src/lxc/virtlxcd.service.in b/src/lxc/virtlxcd.service.in index 0665f21ee0..3af7c1a52d 100644 --- a/src/lxc/virtlxcd.service.in +++ b/src/lxc/virtlxcd.service.in @@ -19,7 +19,7 @@ Documentation=https://libvirt.org [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd -ExecStart=@sbindir@/virtlxcd --timeout 120 $VIRTLXCD_ARGS +ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure diff --git a/src/lxc/virtlxcd.sysconf b/src/lxc/virtlxcd.sysconf index d342aec88b..119a4a23f3 100644 --- a/src/lxc/virtlxcd.sysconf +++ b/src/lxc/virtlxcd.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtlxcd.service systemd unit -VIRTLXCD_ARGS="" +VIRTLXCD_ARGS="--timeout 120" diff --git a/src/network/virtnetworkd.service.in b/src/network/virtnetworkd.service.in index beef277a34..e7f1326945 100644 --- a/src/network/virtnetworkd.service.in +++ b/src/network/virtnetworkd.service.in @@ -14,7 +14,7 @@ Documentation=https://libvirt.org [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd -ExecStart=@sbindir@/virtnetworkd --timeout 120 $VIRTNETWORKD_ARGS +ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure KillMode=process diff --git a/src/network/virtnetworkd.sysconf b/src/network/virtnetworkd.sysconf index fda82c1a76..93f3a7a327 100644 --- a/src/network/virtnetworkd.sysconf +++ b/src/network/virtnetworkd.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtnetworkd.service systemd unit -VIRTNETWORKD_ARGS="" +VIRTNETWORKD_ARGS="--timeout 120" diff --git a/src/node_device/virtnodedevd.service.in b/src/node_device/virtnodedevd.service.in index 4795fc9167..d2453dd620 100644 --- a/src/node_device/virtnodedevd.service.in +++ b/src/node_device/virtnodedevd.service.in @@ -14,7 +14,7 @@ Documentation=https://libvirt.org [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd -ExecStart=@sbindir@/virtnodedevd --timeout 120 $VIRTNODEDEVD_ARGS +ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/node_device/virtnodedevd.sysconf b/src/node_device/virtnodedevd.sysconf index 9ffea04634..fa7faa3a79 100644 --- a/src/node_device/virtnodedevd.sysconf +++ b/src/node_device/virtnodedevd.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtnodedevd.service systemd unit -VIRTNODEDEVD_ARGS="" +VIRTNODEDEVD_ARGS="--timeout 120" diff --git a/src/nwfilter/virtnwfilterd.service.in b/src/nwfilter/virtnwfilterd.service.in index 3517232edc..dda7c01a3d 100644 --- a/src/nwfilter/virtnwfilterd.service.in +++ b/src/nwfilter/virtnwfilterd.service.in @@ -14,7 +14,7 @@ Documentation=https://libvirt.org [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd -ExecStart=@sbindir@/virtnwfilterd --timeout 120 $VIRTNWFILTERD_ARGS +ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/nwfilter/virtnwfilterd.sysconf b/src/nwfilter/virtnwfilterd.sysconf index 4d46b6581a..80cc645ba5 100644 --- a/src/nwfilter/virtnwfilterd.sysconf +++ b/src/nwfilter/virtnwfilterd.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtnwfilterd.service systemd unit -VIRTNWFILTERD_ARGS="" +VIRTNWFILTERD_ARGS="--timeout 120" diff --git a/src/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in index 55a95640b1..8abc9d3a7f 100644 --- a/src/qemu/virtqemud.service.in +++ b/src/qemu/virtqemud.service.in @@ -19,7 +19,7 @@ Documentation=https://libvirt.org [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud -ExecStart=@sbindir@/virtqemud --timeout 120 $VIRTQEMUD_ARGS +ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure diff --git a/src/qemu/virtqemud.sysconf b/src/qemu/virtqemud.sysconf index 1bab275240..70f76c7c47 100644 --- a/src/qemu/virtqemud.sysconf +++ b/src/qemu/virtqemud.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtqemud.service systemd unit -VIRTQEMUD_ARGS="" +VIRTQEMUD_ARGS="--timeout 120" diff --git a/src/remote/virtproxyd.service.in b/src/remote/virtproxyd.service.in index 39d82bb53d..f43ce9ee6e 100644 --- a/src/remote/virtproxyd.service.in +++ b/src/remote/virtproxyd.service.in @@ -14,7 +14,7 @@ Documentation=https://libvirt.org [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd -ExecStart=@sbindir@/virtproxyd --timeout 120 $VIRTPROXYD_ARGS +ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/remote/virtproxyd.sysconf b/src/remote/virtproxyd.sysconf index 805b6185b5..0fc5c61096 100644 --- a/src/remote/virtproxyd.sysconf +++ b/src/remote/virtproxyd.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtproxyd.service systemd unit -VIRTPROXYD_ARGS="" +VIRTPROXYD_ARGS="--timeout 120" diff --git a/src/secret/virtsecretd.service.in b/src/secret/virtsecretd.service.in index 84f2001028..8444142a3a 100644 --- a/src/secret/virtsecretd.service.in +++ b/src/secret/virtsecretd.service.in @@ -14,7 +14,7 @@ Documentation=https://libvirt.org [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd -ExecStart=@sbindir@/virtsecretd --timeout 120 $VIRTSECRETD_ARGS +ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/secret/virtsecretd.sysconf b/src/secret/virtsecretd.sysconf index 9303dd7bcc..2247d05964 100644 --- a/src/secret/virtsecretd.sysconf +++ b/src/secret/virtsecretd.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtsecretd.service systemd unit -VIRTSECRETD_ARGS="" +VIRTSECRETD_ARGS="--timeout 120" diff --git a/src/storage/virtstoraged.service.in b/src/storage/virtstoraged.service.in index a33fb289d5..fc3e9a1b69 100644 --- a/src/storage/virtstoraged.service.in +++ b/src/storage/virtstoraged.service.in @@ -16,7 +16,7 @@ Documentation=https://libvirt.org [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged -ExecStart=@sbindir@/virtstoraged --timeout 120 $VIRTSTORAGED_ARGS +ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/storage/virtstoraged.sysconf b/src/storage/virtstoraged.sysconf index 268d80b902..122373eb7c 100644 --- a/src/storage/virtstoraged.sysconf +++ b/src/storage/virtstoraged.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtstoraged.service systemd unit -VIRTSTORAGED_ARGS="" +VIRTSTORAGED_ARGS="--timeout 120" diff --git a/src/vbox/virtvboxd.service.in b/src/vbox/virtvboxd.service.in index 8240c45646..ebb31dde07 100644 --- a/src/vbox/virtvboxd.service.in +++ b/src/vbox/virtvboxd.service.in @@ -15,7 +15,7 @@ Documentation=https://libvirt.org [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd -ExecStart=@sbindir@/virtvboxd --timeout 120 $VIRTVBOXD_ARGS +ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/vbox/virtvboxd.sysconf b/src/vbox/virtvboxd.sysconf index a94c8ae23c..37ad353d54 100644 --- a/src/vbox/virtvboxd.sysconf +++ b/src/vbox/virtvboxd.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtvboxd.service systemd unit -VIRTVBOXD_ARGS="" +VIRTVBOXD_ARGS="--timeout 120" diff --git a/src/vz/virtvzd.service.in b/src/vz/virtvzd.service.in index 15ccfeb172..f551cb8fbf 100644 --- a/src/vz/virtvzd.service.in +++ b/src/vz/virtvzd.service.in @@ -15,7 +15,7 @@ Documentation=https://libvirt.org [Service] Type=notify EnvironmentFile=-@sysconfdir@/sysconfig/virtvzd -ExecStart=@sbindir@/virtvzd --timeout 120 $VIRTVZD_ARGS +ExecStart=@sbindir@/virtvzd $VIRTVZD_ARGS ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure diff --git a/src/vz/virtvzd.sysconf b/src/vz/virtvzd.sysconf index 7db30df94b..a86b9dfb6c 100644 --- a/src/vz/virtvzd.sysconf +++ b/src/vz/virtvzd.sysconf @@ -1,3 +1,3 @@ # Customizations for the virtvzd.service systemd unit -VIRTVZD_ARGS="" +VIRTVZD_ARGS="--timeout 120" -- 2.25.1

On Thu, Apr 02, 2020 at 07:14:29PM +0200, Andrea Bolognani wrote:
This follows the example set by libvirtd, and makes it easier for the admin to tweak the timeout or disable it altogether.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- src/interface/virtinterfaced.service.in | 2 +- src/interface/virtinterfaced.sysconf | 2 +- src/libxl/virtxend.service.in | 2 +- src/libxl/virtxend.sysconf | 2 +- src/lxc/virtlxcd.service.in | 2 +- src/lxc/virtlxcd.sysconf | 2 +- src/network/virtnetworkd.service.in | 2 +- src/network/virtnetworkd.sysconf | 2 +- src/node_device/virtnodedevd.service.in | 2 +- src/node_device/virtnodedevd.sysconf | 2 +- src/nwfilter/virtnwfilterd.service.in | 2 +- src/nwfilter/virtnwfilterd.sysconf | 2 +- src/qemu/virtqemud.service.in | 2 +- src/qemu/virtqemud.sysconf | 2 +- src/remote/virtproxyd.service.in | 2 +- src/remote/virtproxyd.sysconf | 2 +- src/secret/virtsecretd.service.in | 2 +- src/secret/virtsecretd.sysconf | 2 +- src/storage/virtstoraged.service.in | 2 +- src/storage/virtstoraged.sysconf | 2 +- src/vbox/virtvboxd.service.in | 2 +- src/vbox/virtvboxd.sysconf | 2 +- src/vz/virtvzd.service.in | 2 +- src/vz/virtvzd.sysconf | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> 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 :|

libvirtd supports this feature, and virtqemud ultimately calls to the same code so it does as well: advertise it in the sysconf file for the latter, as is already the case for the former. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/virtqemud.sysconf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/qemu/virtqemud.sysconf b/src/qemu/virtqemud.sysconf index 70f76c7c47..87b626e3ed 100644 --- a/src/qemu/virtqemud.sysconf +++ b/src/qemu/virtqemud.sysconf @@ -1,3 +1,12 @@ # Customizations for the virtqemud.service systemd unit VIRTQEMUD_ARGS="--timeout 120" + +# Override the QEMU/SDL default audio driver probing when +# starting virtual machines using SDL graphics +# +# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio +# is enabled in /etc/libvirt/qemu.conf +#QEMU_AUDIO_DRV=sdl +# +#SDL_AUDIODRIVER=pulse -- 2.25.1

On Thu, Apr 02, 2020 at 07:14:30PM +0200, Andrea Bolognani wrote:
libvirtd supports this feature, and virtqemud ultimately calls to the same code so it does as well: advertise it in the sysconf file for the latter, as is already the case for the former.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/qemu/virtqemud.sysconf | 9 +++++++++ 1 file changed, 9 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> 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 :|

When the comment in libvirtd.sasl was last updated with commit fe772f24a6809b3d937ed6547cbaa9d820e514b6 Author: Cole Robinson <crobinso@redhat.com> Date: Sat Oct 20 14:10:03 2012 -0400 daemon: Avoid 'Could not find keytab file' in syslog it was noted that only old versions of kerberos would need the environment variable to be set: that was more than seven years ago, so it's safe to assume that none of our current target platforms still requires that hack and setting the appropriate key in the configuration file will be enough. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/remote/libvirtd.init.in | 1 - src/remote/libvirtd.sasl | 4 +--- src/remote/libvirtd.sysconf | 3 --- src/remote/virtproxyd.init.in | 1 - 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/remote/libvirtd.init.in b/src/remote/libvirtd.init.in index b708befbc5..91228db411 100644 --- a/src/remote/libvirtd.init.in +++ b/src/remote/libvirtd.init.in @@ -7,7 +7,6 @@ LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"} command="@sbindir@/libvirtd" command_args="-d ${LIBVIRTD_OPTS}" -start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab" pidfile="@runstatedir@/libvirtd.pid" retry="${LIBVIRTD_TERMTIMEOUT}" diff --git a/src/remote/libvirtd.sasl b/src/remote/libvirtd.sasl index 9e7699c75a..7a45470a9d 100644 --- a/src/remote/libvirtd.sasl +++ b/src/remote/libvirtd.sasl @@ -33,9 +33,7 @@ mech_list: gssapi # qemu+tcp://hostname/system?auth=sasl.gssapi #mech_list: scram-sha-1 gssapi -# Some older builds of MIT kerberos on Linux ignore this option & -# instead need KRB5_KTNAME env var. -# For modern Linux, and other OS, this should be sufficient +# File containing the service principal for libvirtd # keytab: /etc/libvirt/krb5.tab diff --git a/src/remote/libvirtd.sysconf b/src/remote/libvirtd.sysconf index ee9db22bab..18aec1ba67 100644 --- a/src/remote/libvirtd.sysconf +++ b/src/remote/libvirtd.sysconf @@ -11,9 +11,6 @@ LIBVIRTD_ARGS="--timeout 120" # can be used to listen on TCP/TLS sockets #LIBVIRTD_ARGS="--listen" -# Override Kerberos service keytab for SASL/GSSAPI -#KRB5_KTNAME=/etc/libvirt/krb5.tab - # Override the QEMU/SDL default audio driver probing when # starting virtual machines using SDL graphics # diff --git a/src/remote/virtproxyd.init.in b/src/remote/virtproxyd.init.in index b644c084a9..436b2b6c0d 100644 --- a/src/remote/virtproxyd.init.in +++ b/src/remote/virtproxyd.init.in @@ -7,7 +7,6 @@ VIRTPROXYD_TIMEOUT=${VIRTPROXYD_TERMTIMEOUT:-"TERM/25/KILL/5"} command="@sbindir@/virtproxyd" command_args="-d ${VIRTPROXYD_OPTS}" -start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab" pidfile="@runstatedir@/virtproxyd.pid" retry="${VIRTPROXYD_TERMTIMEOUT}" -- 2.25.1

On Thu, Apr 02, 2020 at 07:14:31PM +0200, Andrea Bolognani wrote:
When the comment in libvirtd.sasl was last updated with
commit fe772f24a6809b3d937ed6547cbaa9d820e514b6 Author: Cole Robinson <crobinso@redhat.com> Date: Sat Oct 20 14:10:03 2012 -0400
daemon: Avoid 'Could not find keytab file' in syslog
it was noted that only old versions of kerberos would need the environment variable to be set: that was more than seven years ago, so it's safe to assume that none of our current target platforms still requires that hack and setting the appropriate key in the configuration file will be enough.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> --- src/remote/libvirtd.init.in | 1 - src/remote/libvirtd.sasl | 4 +--- src/remote/libvirtd.sysconf | 3 --- src/remote/virtproxyd.init.in | 1 - 4 files changed, 1 insertion(+), 8 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> 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 :|
participants (2)
-
Andrea Bolognani
-
Daniel P. Berrangé