systemd: Set service_extra_in/socket_extra_in everywhere

It's somewhat confusing that some of the services have a
corresponding foo.service.extra.in and foo.socket.extra.in, some
have just one of the two, and some have neither.

In order to make things more approachable, make sure that both
files exists for each service.

In most cases the extra units are currently unused, so they will
just contain a comment briefly explaining their purpose and
pointing users to meson.build, where they can find more
information. The same comment is also added to the top of
extra units that already have some contents in them for
consistency.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Andrea Bolognani 2023-09-29 15:20:07 +02:00
parent ee86c2add3
commit 95e6615cd2
46 changed files with 136 additions and 0 deletions

View File

@ -66,6 +66,9 @@ if conf.has('WITH_CH')
systemd_service_tasksmax_extra_in,
systemd_service_limitmemlock_extra_in,
],
'socket_extra_in': [
files('virtchd.socket.extra.in'),
],
}
virt_install_dirs += [

View File

@ -1,3 +1,6 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.
[Unit]
Wants=systemd-machined.service
After=systemd-machined.service

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -45,6 +45,12 @@ if conf.has('WITH_INTERFACE')
virt_daemon_units += {
'service': 'virtinterfaced',
'name': 'interface',
'service_extra_in': [
files('virtinterfaced.service.extra.in'),
],
'socket_extra_in': [
files('virtinterfaced.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -1,3 +1,6 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.
[Unit]
Wants=virtlockd.socket
After=virtlockd.socket

View File

@ -1,2 +1,5 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.
[Unit]
ConditionPathExists=/proc/xen/capabilities

View File

@ -145,6 +145,7 @@ if conf.has('WITH_LIBVIRTD')
'service': 'virtlockd',
'service_in': files('virtlockd.service.in'),
'service_extra_in': [
files('virtlockd.service.extra.in'),
systemd_service_oomscoreadjust_extra_in,
systemd_service_limitnofile_extra_in,
],
@ -152,6 +153,9 @@ if conf.has('WITH_LIBVIRTD')
'sockets': [ 'main', 'admin' ],
'socket_in': files('virtlockd.socket.in'),
'socket_admin_in': files('virtlockd-admin.socket.in'),
'socket_extra_in': [
files('virtlockd.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -92,6 +92,7 @@ if conf.has('WITH_LIBVIRTD')
'service': 'virtlogd',
'service_in': files('virtlogd.service.in'),
'service_extra_in': [
files('virtlogd.service.extra.in'),
systemd_service_oomscoreadjust_extra_in,
systemd_service_limitnofile_extra_in,
],
@ -99,6 +100,9 @@ if conf.has('WITH_LIBVIRTD')
'sockets': [ 'main', 'admin' ],
'socket_in': files('virtlogd.socket.in'),
'socket_admin_in': files('virtlogd-admin.socket.in'),
'socket_extra_in': [
files('virtlogd.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -171,6 +171,9 @@ if conf.has('WITH_LXC')
systemd_service_tasksmax_extra_in,
systemd_service_limitmemlock_extra_in,
],
'socket_extra_in': [
files('virtlxcd.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -1,3 +1,6 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.
[Unit]
Wants=systemd-machined.service
After=systemd-machined.service

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -66,6 +66,9 @@ if conf.has('WITH_NETWORK')
'service_extra_in': [
files('virtnetworkd.service.extra.in'),
],
'socket_extra_in': [
files('virtnetworkd.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -1,2 +1,5 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.
[Service]
KillMode=process

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -53,6 +53,12 @@ if conf.has('WITH_NODE_DEVICES')
virt_daemon_units += {
'service': 'virtnodedevd',
'name': 'nodedev',
'service_extra_in': [
files('virtnodedevd.service.extra.in'),
],
'socket_extra_in': [
files('virtnodedevd.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -51,6 +51,12 @@ if conf.has('WITH_NWFILTER')
virt_daemon_units += {
'service': 'virtnwfilterd',
'name': 'nwfilter',
'service_extra_in': [
files('virtnwfilterd.service.extra.in'),
],
'socket_extra_in': [
files('virtnwfilterd.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -190,6 +190,9 @@ if conf.has('WITH_QEMU')
systemd_service_tasksmax_extra_in,
systemd_service_limitmemlock_extra_in,
],
'socket_extra_in': [
files('virtqemud.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -1,3 +1,6 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.
[Unit]
Requires=virtlogd.socket
Wants=virtlockd.socket

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -192,6 +192,7 @@ if conf.has('WITH_REMOTE')
'service': 'libvirtd',
'service_in': files('libvirtd.service.in'),
'service_extra_in': [
files('libvirtd.service.extra.in'),
systemd_service_limitnofile_extra_in,
systemd_service_tasksmax_extra_in,
systemd_service_limitmemlock_extra_in,
@ -203,6 +204,9 @@ if conf.has('WITH_REMOTE')
'socket_admin_in': files('libvirtd-admin.socket.in'),
'socket_tcp_in': files('libvirtd-tcp.socket.in'),
'socket_tls_in': files('libvirtd-tls.socket.in'),
'socket_extra_in': [
files('libvirtd.socket.extra.in'),
],
}
openrc_init_files += {
@ -229,8 +233,14 @@ if conf.has('WITH_REMOTE')
virt_daemon_units += {
'service': 'virtproxyd',
'name': 'proxy',
'service_extra_in': [
files('virtproxyd.service.extra.in'),
],
'sockprefix': 'libvirt',
'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ],
'socket_extra_in': [
files('virtproxyd.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -34,6 +34,12 @@ if conf.has('WITH_SECRETS')
virt_daemon_units += {
'service': 'virtsecretd',
'name': 'secret',
'service_extra_in': [
files('virtsecretd.service.extra.in'),
],
'socket_extra_in': [
files('virtsecretd.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -115,6 +115,9 @@ if conf.has('WITH_STORAGE')
'service_extra_in': [
files('virtstoraged.service.extra.in'),
],
'socket_extra_in': [
files('virtstoraged.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -1,3 +1,6 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.
[Unit]
After=iscsid.service
After=remote-fs.target

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -61,6 +61,9 @@ if conf.has('WITH_VBOX')
'service_extra_in': [
files('virtvboxd.service.extra.in'),
],
'socket_extra_in': [
files('virtvboxd.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -1,2 +1,5 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.
[Unit]
After=remote-fs.target

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.

View File

@ -52,6 +52,9 @@ if conf.has('WITH_VZ')
'service_extra_in': [
files('virtvzd.service.extra.in'),
],
'socket_extra_in': [
files('virtvzd.socket.extra.in'),
],
}
openrc_init_files += {

View File

@ -1,2 +1,5 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.
[Unit]
After=remote-fs.target

View File

@ -0,0 +1,2 @@
# The contents of this unit will be merged into a base template.
# Additional units might be merged as well. See meson.build for details.