Re: [libvirt PATCH v2 0/8] meson: Improve handling of tests

2023-10-26 Thread Martin Kletzander
On Wed, Oct 25, 2023 at 07:06:53PM +0200, Andrea Bolognani wrote: Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/1049326523 Changes from [v1] * fix test suite on macOS and ensure it is run as part of the pipeline (with the previous version it would just always fail); *

[libvirt PATCH v2 5/8] meson: Handle -Dtests=enabled with Clang

2023-10-25 Thread Andrea Bolognani
There are some cases in which we automatically disable tests when using Clang as the compiler. If the user has explicitly asked for tests to be enabled, however, we should error out instead of silently disabling things. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik ---

[libvirt PATCH v2 7/8] meson: Disable all tests when tests are disabled

2023-10-25 Thread Andrea Bolognani
Currently, passing -Dtests=disabled only disables a subset of tests: those that are written in C and thus require compilation. Other tests, such as the syntax-check ones and those that are implemented as scripts, are always enabled. There's a potentially dangerous consequence of this behavior:

[libvirt PATCH v2 1/8] tests: Fix some test cases on macOS

2023-10-25 Thread Andrea Bolognani
Test cases that depend on duplicating fds are using fairly big values as targets. This works fine on Linux, where RLIMIT_NOFILE is 1024 by default, but fails on macOS which uses 256 as the default. Decrease the values so that they're valid across all platforms. Signed-off-by: Andrea Bolognani

[libvirt PATCH v2 8/8] meson: Rename build_tests -> tests_enabled

2023-10-25 Thread Andrea Bolognani
Given that this variable now controls not just whether C tests are built, but also whether any test at all is executed, the new name is more appropriate. Update the description for the corresponding meson option accordingly. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik ---

[libvirt PATCH v2 6/8] meson: Make -Dexpensive_tests depend on -Dtests

2023-10-25 Thread Andrea Bolognani
It only makes sense to enable expensive tests when tests are enabled. Disallow invalid configurations. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- meson.build | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index

[libvirt PATCH v2 3/8] meson: Do less when not building from git

2023-10-25 Thread Andrea Bolognani
As explained in the comment, the syntax-check machinery uses git to figure out the list of files it should operate on, so we can only enable it when building from git. Despite only registering the various tests with meson in that case, however, we unconditionally perform a bunch of preparation

[libvirt PATCH v2 4/8] meson: Move all handling of test options together

2023-10-25 Thread Andrea Bolognani
This will make future patches nicer. Note that we need to handle these somewhat late because of the dependency on information about the compiler and the flags it supports. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- meson.build | 57

[libvirt PATCH v2 2/8] ci: Disable optimizations on macOS

2023-10-25 Thread Andrea Bolognani
Clang can be too aggressive at optimizations, which can end up breaking our test suite. See f9f5ab57189b for details. As a result of this, since 7944700b4037 we are automatically disabling tests when Clang is used unless it supports the -fsemantic-interposition compiler flag. Since the version

[libvirt PATCH v2 0/8] meson: Improve handling of tests

2023-10-25 Thread Andrea Bolognani
Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/1049326523 Changes from [v1] * fix test suite on macOS and ensure it is run as part of the pipeline (with the previous version it would just always fail); * disable a couple of tests (check-html, check-html-references)

Re: [libvirt PATCH v2] hypervisor: Move interface mgmt methods to hypervisor

2023-10-19 Thread Praveen Paladugu
On Wed, Oct 18, 2023 at 03:36:47PM -0400, Laine Stump wrote: > On 10/16/23 3:34 PM, Praveen K Paladugu wrote: > >Move guest interface management methods from qemu to hypervisor. These > >methods will be shared by networking support in ch driver. > > > >Signed-off-by: Praveen K Paladugu > >--- > >

Re: [libvirt PATCH v2] hypervisor: Move interface mgmt methods to hypervisor

2023-10-18 Thread Laine Stump
On 10/16/23 3:34 PM, Praveen K Paladugu wrote: Move guest interface management methods from qemu to hypervisor. These methods will be shared by networking support in ch driver. Signed-off-by: Praveen K Paladugu --- po/POTFILES | 1 + src/hypervisor/domain_interface.c

[libvirt PATCH v2] hypervisor: Move interface mgmt methods to hypervisor

2023-10-16 Thread Praveen K Paladugu
Move guest interface management methods from qemu to hypervisor. These methods will be shared by networking support in ch driver. Signed-off-by: Praveen K Paladugu --- po/POTFILES | 1 + src/hypervisor/domain_interface.c | 280 ++

Re: [libvirt PATCH v2 0/1] meson: Improve nbdkit configurability

2023-10-05 Thread Jonathon Jongsma
On 10/5/23 4:22 AM, Andrea Bolognani wrote: Changes from [v1]: * disable nbdkit on anything older than Fedora 40 in the RPM. [v1] https://listman.redhat.com/archives/libvir-list/2023-October/242498.html Andrea Bolognani (1): meson: Improve nbdkit configurability libvirt.spec.in

[libvirt PATCH v2 1/1] meson: Improve nbdkit configurability

2023-10-05 Thread Andrea Bolognani
Currently, nbdkit support will automatically be enabled as long as the pidfd_open(2) syscall is available. Optionally, libnbd is used to generate more user-friendly error messages. In theory this is all good, since use of nbdkit is supposed to be transparent to the user. In practice, however,

[libvirt PATCH v2 0/1] meson: Improve nbdkit configurability

2023-10-05 Thread Andrea Bolognani
Changes from [v1]: * disable nbdkit on anything older than Fedora 40 in the RPM. [v1] https://listman.redhat.com/archives/libvir-list/2023-October/242498.html Andrea Bolognani (1): meson: Improve nbdkit configurability libvirt.spec.in| 28 +--- meson.build

Re: [libvirt PATCH v2 31/33] systemd: Add RemoveOnStop=yes to all sockets

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:32PM +0200, Andrea Bolognani wrote: > Currently we only set this for the main sockets, which means > that > > $ systemctl stop virtqemud.socket > > will make the socket disappear from the filesystem while > > $ systemctl stop virtqemud-ro.socket > > won't. Get

Re: [libvirt PATCH v2 06/33] systemd: Introduce common templates

2023-09-28 Thread Daniel P . Berrangé
On Thu, Sep 28, 2023 at 06:52:35AM -0500, Andrea Bolognani wrote: > On Thu, Sep 28, 2023 at 04:30:03AM -0500, Andrea Bolognani wrote: > > On Thu, Sep 28, 2023 at 09:24:11AM +0100, Daniel P. Berrangé wrote: > > > On Wed, Sep 27, 2023 at 06:19:07PM +0200, Andrea Bolognani wrote: > > > > +++

Re: [libvirt PATCH v2 06/33] systemd: Introduce common templates

2023-09-28 Thread Andrea Bolognani
On Thu, Sep 28, 2023 at 04:30:03AM -0500, Andrea Bolognani wrote: > On Thu, Sep 28, 2023 at 09:24:11AM +0100, Daniel P. Berrangé wrote: > > On Wed, Sep 27, 2023 at 06:19:07PM +0200, Andrea Bolognani wrote: > > > +++ b/scripts/merge-systemd-units.py > > > @@ -0,0 +1,91 @@ > > > +#!/usr/bin/env

Re: [libvirt PATCH v2 10/33] systemd: Switch virtnwfilterd to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:11PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/nwfilter/meson.build | 4 > src/nwfilter/virtnwfilterd.service.in | 25 - > 2 files changed, 29 deletions(-) > delete mode 100644

Re: [libvirt PATCH v2 07/33] systemd: Use common templates by default

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:08PM +0200, Andrea Bolognani wrote: > All services are still listing their input files explicitly, so > no changes to the output files will occur yet. > > Signed-off-by: Andrea Bolognani > --- > src/meson.build | 10 +- > 1 file changed, 5 insertions(+), 5

Re: [libvirt PATCH v2 26/33] systemd: Downgrade read-only/admin sockets to Wants

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:27PM +0200, Andrea Bolognani wrote: > Only the main socket is actually necessary for the service to be > usable. > > In the past, we've had security issues that could be exploited via > access to the read-only socket, so a security-minded administrator > might

Re: [libvirt PATCH v2 30/33] systemd: Add Also between sockets

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:31PM +0200, Andrea Bolognani wrote: > This results in all sockets for a service being enabled when a > single one of them is. > > The -tcp and -tls sockets are intentionally excluded, because > enabling them should require explicit action on the > administrator's

Re: [libvirt PATCH v2 32/33] systemd: Improve and unify unit descriptions

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:33PM +0200, Andrea Bolognani wrote: > Hypervisors are referred to by their user-facing name rather > than the name of their libvirt driver, the monolithic daemon is > explicitly referred to as legacy, and a consistent format is > used throughout. > > Signed-off-by:

Re: [libvirt PATCH v2 14/33] systemd: Switch virtvboxd to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:15PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/vbox/meson.build| 5 + > src/vbox/virtvboxd.service.extra.in | 2 ++ > src/vbox/virtvboxd.service.in | 26 -- > 3 files changed, 3

Re: [libvirt PATCH v2 08/33] systemd: Switch virtnodedevd to common templates

2023-09-28 Thread Daniel P . Berrangé
On Thu, Sep 28, 2023 at 05:38:45AM -0500, Andrea Bolognani wrote: > On Thu, Sep 28, 2023 at 11:16:53AM +0100, Daniel P. Berrangé wrote: > > On Wed, Sep 27, 2023 at 06:19:09PM +0200, Andrea Bolognani wrote: > > > Signed-off-by: Andrea Bolognani > > > --- > > > src/node_device/meson.build

Re: [libvirt PATCH v2 16/33] systemd: Switch virtchd to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:17PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/ch/meson.build | 5 +--- > src/ch/virtchd.service.extra.in | 22 + > src/ch/virtchd.service.in | 44 - > 3 files

Re: [libvirt PATCH v2 13/33] systemd: Switch virtstoraged to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:14PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/storage/meson.build | 5 + > src/storage/virtstoraged.service.extra.in | 3 +++ > src/storage/virtstoraged.service.in | 27 --- > 3

Re: [libvirt PATCH v2 09/33] systemd: Switch virtinterfaced to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:10PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/interface/meson.build | 4 > src/interface/virtinterfaced.service.in | 25 - > 2 files changed, 29 deletions(-) > delete mode 100644

Re: [libvirt PATCH v2 15/33] systemd: Switch virtvzd to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:16PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/vz/meson.build | 5 + > src/vz/virtvzd.service.extra.in | 2 ++ > src/vz/virtvzd.service.in | 26 -- > 3 files changed, 3

Re: [libvirt PATCH v2 19/33] systemd: Switch virtqemud to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:20PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/qemu/meson.build| 5 +-- > src/qemu/virtqemud.service.extra.in | 28 + > src/qemu/virtqemud.service.in | 48 - > 3

Re: [libvirt PATCH v2 08/33] systemd: Switch virtnodedevd to common templates

2023-09-28 Thread Andrea Bolognani
On Thu, Sep 28, 2023 at 11:16:53AM +0100, Daniel P. Berrangé wrote: > On Wed, Sep 27, 2023 at 06:19:09PM +0200, Andrea Bolognani wrote: > > Signed-off-by: Andrea Bolognani > > --- > > src/node_device/meson.build | 4 > > src/node_device/virtnodedevd.service.in | 25

Re: [libvirt PATCH v2 21/33] systemd: Drop libvirtd_socket*_in values

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:22PM +0200, Andrea Bolognani wrote: > Now that the migration to common templates has been completed, > we no longer need these. > > Signed-off-by: Andrea Bolognani > --- > src/meson.build | 4 > 1 file changed, 4 deletions(-) Reviewed-by: Daniel P. Berrangé

Re: [libvirt PATCH v2 11/33] systemd: Switch virtsecretd to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:12PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/secret/meson.build| 4 > src/secret/virtsecretd.service.in | 25 - > 2 files changed, 29 deletions(-) > delete mode 100644

Re: [libvirt PATCH v2 08/33] systemd: Switch virtnodedevd to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:09PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/node_device/meson.build | 4 > src/node_device/virtnodedevd.service.in | 25 - > 2 files changed, 29 deletions(-) > delete mode 100644

Re: [libvirt PATCH v2 02/33] systemd: Introduce service_in/service_out variables

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:03PM +0200, Andrea Bolognani wrote: > They're similar to the existing socket_in/socket_out variables > and will make future changes nicer. > > Signed-off-by: Andrea Bolognani > --- > src/meson.build | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-)

Re: [libvirt PATCH v2 18/33] systemd: Switch virtlxcd to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:19PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/lxc/meson.build | 5 +--- > src/lxc/virtlxcd.service.extra.in | 22 > src/lxc/virtlxcd.service.in | 44 --- > 3 files

Re: [libvirt PATCH v2 20/33] systemd: Switch virtproxyd to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:21PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/remote/meson.build | 6 -- > src/remote/virtproxyd.service.in | 25 - > 2 files changed, 31 deletions(-) > delete mode 100644

Re: [libvirt PATCH v2 12/33] systemd: Switch virtnetworkd to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:13PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/network/meson.build | 5 + > src/network/virtnetworkd.service.extra.in | 2 ++ > src/network/virtnetworkd.service.in | 26 --- > 3

Re: [libvirt PATCH v2 17/33] systemd: Switch virtxend to common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:18PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/libxl/meson.build | 7 ++- > src/libxl/virtxend.service.extra.in | 12 +++ > src/libxl/virtxend.service.in | 32 - >

Re: [libvirt PATCH v2 04/33] systemd: Introduce temporary libvirtd_socket*_in values

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:05PM +0200, Andrea Bolognani wrote: > These will be useful during the upcoming migration to common > templates for systemd units and will be dropped as soon as all > services have been converted. > > Signed-off-by: Andrea Bolognani > --- > src/meson.build | 4

Re: [libvirt PATCH v2 03/33] systemd: Make @service_in@ optional

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:04PM +0200, Andrea Bolognani wrote: > It is currently considered required, but we're soon going to > provide a default that will be suitable for most services. > > Since all services currently provide a value explicitly, we > can implement a default without breaking

Re: [libvirt PATCH v2 06/33] systemd: Introduce common templates

2023-09-28 Thread Andrea Bolognani
On Thu, Sep 28, 2023 at 09:24:11AM +0100, Daniel P. Berrangé wrote: > On Wed, Sep 27, 2023 at 06:19:07PM +0200, Andrea Bolognani wrote: > > +++ b/scripts/merge-systemd-units.py > > @@ -0,0 +1,91 @@ > > +#!/usr/bin/env python3 > > Stick a license header of SPDX tag on this. Done (patch below). >

Re: [libvirt PATCH v2 05/33] systemd: Provide all input files explicitly

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:06PM +0200, Andrea Bolognani wrote: > We're about to change the defaults and start migrating to common > templates: in order to be able to switch units over one at a > time, make the input files that are currently used explicit > rather than implicit. > >

Re: [libvirt PATCH v2 06/33] systemd: Introduce common templates

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:07PM +0200, Andrea Bolognani wrote: > We already use templating to generate sockets, which are all > based off libvirtd's. Push the idea further, and extend it to > cover services as well. > > This is more challenging, as the various modular daemons each have > their

Re: [libvirt PATCH v2 22/33] systemd: Drop @deps@

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:23PM +0200, Andrea Bolognani wrote: > It's no longer used anywhere. > > Signed-off-by: Andrea Bolognani > --- > src/meson.build | 2 -- > src/remote/libvirtd-admin.socket.in | 1 - > src/remote/libvirtd-ro.socket.in| 1 - >

Re: [libvirt PATCH v2 25/33] systemd: Replace Requires with BindTo+After for main socket

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:26PM +0200, Andrea Bolognani wrote: > This is the strongest relationship that can be declared between > two units, and causes the service to be terminated immediately > if its main socket disappears. This is the behavior we want. > > Note that we don't do the same

Re: [libvirt PATCH v2 23/33] systemd: Drop parametrization from libvirtd sockets

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:24PM +0200, Andrea Bolognani wrote: > Up until now the files have been used as template for most > services, but now that those have been converted to common > templates we can drop parametrization and make it clear that > these files are for libvirtd only. > >

Re: [libvirt PATCH v2 01/33] systemd: Drop Conflicts from virtproxyd sockets

2023-09-28 Thread Daniel P . Berrangé
On Wed, Sep 27, 2023 at 06:19:02PM +0200, Andrea Bolognani wrote: > The idea behind these is to prevent running both modular daemons > and monolithic daemon at the same time. We will implement a more > effective solution for that shortly. > > Signed-off-by: Andrea Bolognani > --- >

[libvirt PATCH v2 22/33] systemd: Drop @deps@

2023-09-27 Thread Andrea Bolognani
It's no longer used anywhere. Signed-off-by: Andrea Bolognani --- src/meson.build | 2 -- src/remote/libvirtd-admin.socket.in | 1 - src/remote/libvirtd-ro.socket.in| 1 - src/remote/libvirtd-tcp.socket.in | 1 - src/remote/libvirtd-tls.socket.in | 1 -

[libvirt PATCH v2 31/33] systemd: Add RemoveOnStop=yes to all sockets

2023-09-27 Thread Andrea Bolognani
Currently we only set this for the main sockets, which means that $ systemctl stop virtqemud.socket will make the socket disappear from the filesystem while $ systemctl stop virtqemud-ro.socket won't. Get rid of this inconsistency. Signed-off-by: Andrea Bolognani ---

[libvirt PATCH v2 28/33] systemd: Drop Before=libvirtd from virtlogd/virtlockd

2023-09-27 Thread Andrea Bolognani
We have already declared the mirror relationship, so this one is now redundant. Moreover, this version was incomplete: it only ever worked for the monolithic daemon, but the modular daemons for QEMU and Xen also want the sockets to be active. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel

[libvirt PATCH v2 33/33] systemd: Move Documentation lines

2023-09-27 Thread Andrea Bolognani
Like the Description, these are intended to be displayed to the user, so it makes sense to have them towards the top of the file before all the information that systemd will parse to calculate dependencies. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrangé ---

[libvirt PATCH v2 03/33] systemd: Make @service_in@ optional

2023-09-27 Thread Andrea Bolognani
It is currently considered required, but we're soon going to provide a default that will be suitable for most services. Since all services currently provide a value explicitly, we can implement a default without breaking anything. Signed-off-by: Andrea Bolognani --- src/meson.build | 6 --

[libvirt PATCH v2 11/33] systemd: Switch virtsecretd to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/secret/meson.build| 4 src/secret/virtsecretd.service.in | 25 - 2 files changed, 29 deletions(-) delete mode 100644 src/secret/virtsecretd.service.in diff --git a/src/secret/meson.build b/src/secret/meson.build

[libvirt PATCH v2 02/33] systemd: Introduce service_in/service_out variables

2023-09-27 Thread Andrea Bolognani
They're similar to the existing socket_in/socket_out variables and will make future changes nicer. Signed-off-by: Andrea Bolognani --- src/meson.build | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/meson.build b/src/meson.build index 6c85cc9b9b..c6728cc8f8 100644

[libvirt PATCH v2 05/33] systemd: Provide all input files explicitly

2023-09-27 Thread Andrea Bolognani
We're about to change the defaults and start migrating to common templates: in order to be able to switch units over one at a time, make the input files that are currently used explicit rather than implicit. Signed-off-by: Andrea Bolognani --- src/ch/meson.build | 3 +++

[libvirt PATCH v2 12/33] systemd: Switch virtnetworkd to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/network/meson.build | 5 + src/network/virtnetworkd.service.extra.in | 2 ++ src/network/virtnetworkd.service.in | 26 --- 3 files changed, 3 insertions(+), 30 deletions(-) create mode 100644

[libvirt PATCH v2 13/33] systemd: Switch virtstoraged to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/storage/meson.build | 5 + src/storage/virtstoraged.service.extra.in | 3 +++ src/storage/virtstoraged.service.in | 27 --- 3 files changed, 4 insertions(+), 31 deletions(-) create mode 100644

[libvirt PATCH v2 04/33] systemd: Introduce temporary libvirtd_socket*_in values

2023-09-27 Thread Andrea Bolognani
These will be useful during the upcoming migration to common templates for systemd units and will be dropped as soon as all services have been converted. Signed-off-by: Andrea Bolognani --- src/meson.build | 4 1 file changed, 4 insertions(+) diff --git a/src/meson.build b/src/meson.build

[libvirt PATCH v2 06/33] systemd: Introduce common templates

2023-09-27 Thread Andrea Bolognani
We already use templating to generate sockets, which are all based off libvirtd's. Push the idea further, and extend it to cover services as well. This is more challenging, as the various modular daemons each have their own needs in terms of what system services needs to be available before they

[libvirt PATCH v2 14/33] systemd: Switch virtvboxd to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/vbox/meson.build| 5 + src/vbox/virtvboxd.service.extra.in | 2 ++ src/vbox/virtvboxd.service.in | 26 -- 3 files changed, 3 insertions(+), 30 deletions(-) create mode 100644

[libvirt PATCH v2 07/33] systemd: Use common templates by default

2023-09-27 Thread Andrea Bolognani
All services are still listing their input files explicitly, so no changes to the output files will occur yet. Signed-off-by: Andrea Bolognani --- src/meson.build | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/meson.build b/src/meson.build index

[libvirt PATCH v2 27/33] systemd: Augment Requires/Wants with After

2023-09-27 Thread Andrea Bolognani
Requires/Wants only tells systemd that the corresponding unit should be started when the current one is, but that could very well happen in parallel. For virtlogd/virtlockd, we want the socket to be already active when the hypervisor driver is started. Signed-off-by: Andrea Bolognani

[libvirt PATCH v2 29/33] systemd: Drop Before=foo.service from sockets

2023-09-27 Thread Andrea Bolognani
systemd will automatically infer this dependency based on the socket's Service=foo.service setting. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrangé --- src/remote/libvirtd-admin.socket.in | 1 - src/remote/libvirtd-ro.socket.in| 1 - src/remote/libvirtd-tcp.socket.in | 1

[libvirt PATCH v2 25/33] systemd: Replace Requires with BindTo+After for main socket

2023-09-27 Thread Andrea Bolognani
This is the strongest relationship that can be declared between two units, and causes the service to be terminated immediately if its main socket disappears. This is the behavior we want. Note that we don't do the same for the read-only/admin sockets, because those are not as critical for the

[libvirt PATCH v2 18/33] systemd: Switch virtlxcd to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/lxc/meson.build | 5 +--- src/lxc/virtlxcd.service.extra.in | 22 src/lxc/virtlxcd.service.in | 44 --- 3 files changed, 23 insertions(+), 48 deletions(-) create mode 100644

[libvirt PATCH v2 21/33] systemd: Drop libvirtd_socket*_in values

2023-09-27 Thread Andrea Bolognani
Now that the migration to common templates has been completed, we no longer need these. Signed-off-by: Andrea Bolognani --- src/meson.build | 4 1 file changed, 4 deletions(-) diff --git a/src/meson.build b/src/meson.build index 0fbefe37d5..541ca61101 100644 --- a/src/meson.build +++

[libvirt PATCH v2 23/33] systemd: Drop parametrization from libvirtd sockets

2023-09-27 Thread Andrea Bolognani
Up until now the files have been used as template for most services, but now that those have been converted to common templates we can drop parametrization and make it clear that these files are for libvirtd only. Signed-off-by: Andrea Bolognani --- src/remote/libvirtd-admin.socket.in | 10

[libvirt PATCH v2 17/33] systemd: Switch virtxend to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/libxl/meson.build | 7 ++- src/libxl/virtxend.service.extra.in | 12 +++ src/libxl/virtxend.service.in | 32 - src/libxl/virtxend.socket.extra.in | 2 ++ 4 files changed, 16 insertions(+), 37

[libvirt PATCH v2 26/33] systemd: Downgrade read-only/admin sockets to Wants

2023-09-27 Thread Andrea Bolognani
Only the main socket is actually necessary for the service to be usable. In the past, we've had security issues that could be exploited via access to the read-only socket, so a security-minded administrator might consider disabling all optional sockets. This change makes such a setup possible.

[libvirt PATCH v2 10/33] systemd: Switch virtnwfilterd to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/nwfilter/meson.build | 4 src/nwfilter/virtnwfilterd.service.in | 25 - 2 files changed, 29 deletions(-) delete mode 100644 src/nwfilter/virtnwfilterd.service.in diff --git a/src/nwfilter/meson.build

[libvirt PATCH v2 32/33] systemd: Improve and unify unit descriptions

2023-09-27 Thread Andrea Bolognani
Hypervisors are referred to by their user-facing name rather than the name of their libvirt driver, the monolithic daemon is explicitly referred to as legacy, and a consistent format is used throughout. Signed-off-by: Andrea Bolognani --- src/ch/meson.build| 2 +-

[libvirt PATCH v2 16/33] systemd: Switch virtchd to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/ch/meson.build | 5 +--- src/ch/virtchd.service.extra.in | 22 + src/ch/virtchd.service.in | 44 - 3 files changed, 23 insertions(+), 48 deletions(-) create mode 100644

[libvirt PATCH v2 20/33] systemd: Switch virtproxyd to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/remote/meson.build | 6 -- src/remote/virtproxyd.service.in | 25 - 2 files changed, 31 deletions(-) delete mode 100644 src/remote/virtproxyd.service.in diff --git a/src/remote/meson.build b/src/remote/meson.build

[libvirt PATCH v2 08/33] systemd: Switch virtnodedevd to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/node_device/meson.build | 4 src/node_device/virtnodedevd.service.in | 25 - 2 files changed, 29 deletions(-) delete mode 100644 src/node_device/virtnodedevd.service.in diff --git a/src/node_device/meson.build

[libvirt PATCH v2 24/33] systemd: Make modular daemons conflict with libvirtd

2023-09-27 Thread Andrea Bolognani
We want to make sure that, at any given time, we have either the modular daemons or the monolithic one running, never both. In order to achieve that, make every single modular unit conflict with the corresponding libvirtd unit. We set both Conflicts=libvirtd.unit and After=libvirtd.unit: this

[libvirt PATCH v2 01/33] systemd: Drop Conflicts from virtproxyd sockets

2023-09-27 Thread Andrea Bolognani
The idea behind these is to prevent running both modular daemons and monolithic daemon at the same time. We will implement a more effective solution for that shortly. Signed-off-by: Andrea Bolognani --- src/remote/meson.build | 3 --- 1 file changed, 3 deletions(-) diff --git

[libvirt PATCH v2 00/33] systemd: Improve units for services and sockets

2023-09-27 Thread Andrea Bolognani
A grab bag of changes, ranging from very much functional ones to purely aesthetical ones. Changes from [v1] * patches 01-11 from the original series have been pushed; * patch 40 from the original series has been dropped; * patches 02 (cosmetic) and 31 (bug fix) have been added; * the

[libvirt PATCH v2 19/33] systemd: Switch virtqemud to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/qemu/meson.build| 5 +-- src/qemu/virtqemud.service.extra.in | 28 + src/qemu/virtqemud.service.in | 48 - 3 files changed, 29 insertions(+), 52 deletions(-) create mode 100644

[libvirt PATCH v2 30/33] systemd: Add Also between sockets

2023-09-27 Thread Andrea Bolognani
This results in all sockets for a service being enabled when a single one of them is. The -tcp and -tls sockets are intentionally excluded, because enabling them should require explicit action on the administrator's part; moreover, disabling them should not result in the local sockets being

[libvirt PATCH v2 09/33] systemd: Switch virtinterfaced to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/interface/meson.build | 4 src/interface/virtinterfaced.service.in | 25 - 2 files changed, 29 deletions(-) delete mode 100644 src/interface/virtinterfaced.service.in diff --git a/src/interface/meson.build

[libvirt PATCH v2 15/33] systemd: Switch virtvzd to common templates

2023-09-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/vz/meson.build | 5 + src/vz/virtvzd.service.extra.in | 2 ++ src/vz/virtvzd.service.in | 26 -- 3 files changed, 3 insertions(+), 30 deletions(-) create mode 100644 src/vz/virtvzd.service.extra.in delete

Re: [libvirt PATCH v2] util: fix success return for virProcessKillPainfullyDelay()

2023-09-26 Thread Ján Tomko
On a Monday in 2023, Jonathon Jongsma wrote: virProcessKillPainfullyDelay() currently almost always returns 1 or -1, even though the documentation indicates that it should return 0 if the process was terminated gracefully. But the computation of the return code is faulty and the only case that

[libvirt PATCH v2] util: fix success return for virProcessKillPainfullyDelay()

2023-09-25 Thread Jonathon Jongsma
virProcessKillPainfullyDelay() currently almost always returns 1 or -1, even though the documentation indicates that it should return 0 if the process was terminated gracefully. But the computation of the return code is faulty and the only case that it currently returns 0 is when it is called with

Re: [libvirt PATCH v2 0/5] Add support for vDPA block devices

2023-09-13 Thread Erik Skultety
On Wed, Sep 13, 2023 at 12:57:09PM +0200, Erik Skultety wrote: > On Wed, Sep 13, 2023 at 08:56:35AM +0100, Daniel P. Berrangé wrote: > > On Tue, Sep 12, 2023 at 04:11:01PM -0500, Jonathon Jongsma wrote: > > > On 9/12/23 7:00 AM, Peter Krempa wrote: > > > > On Mon, Sep 11, 2023 at 16:53:42 -0500,

Re: [libvirt PATCH v2 0/5] Add support for vDPA block devices

2023-09-13 Thread Erik Skultety
On Wed, Sep 13, 2023 at 08:56:35AM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 12, 2023 at 04:11:01PM -0500, Jonathon Jongsma wrote: > > On 9/12/23 7:00 AM, Peter Krempa wrote: > > > On Mon, Sep 11, 2023 at 16:53:42 -0500, Jonathon Jongsma wrote: > > > > see

Re: [libvirt PATCH v2 18/35] .gitlab-ci.yml: Convert the native build job to the build.sh usage

2023-09-13 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:19PM +0200, Erik Skultety wrote: > Individual shell command executions are replaced by respective > functions in the ci/build.sh base script. This will make sure we use > the same recipes in GitLab jobs as well as in local executions. > > Signed-off-by: Erik Skultety

Re: [libvirt PATCH v2 0/5] Add support for vDPA block devices

2023-09-13 Thread Daniel P . Berrangé
On Tue, Sep 12, 2023 at 04:11:01PM -0500, Jonathon Jongsma wrote: > On 9/12/23 7:00 AM, Peter Krempa wrote: > > On Mon, Sep 11, 2023 at 16:53:42 -0500, Jonathon Jongsma wrote: > > > see https://bugzilla.redhat.com/show_bug.cgi?id=1900770. > > > > > > Changes in v2: > > > - Don't use

Re: [libvirt PATCH v2 0/5] Add support for vDPA block devices

2023-09-13 Thread Peter Krempa
On Tue, Sep 12, 2023 at 16:11:01 -0500, Jonathon Jongsma wrote: > On 9/12/23 7:00 AM, Peter Krempa wrote: > > On Mon, Sep 11, 2023 at 16:53:42 -0500, Jonathon Jongsma wrote: > > > see https://bugzilla.redhat.com/show_bug.cgi?id=1900770. > > > > > > Changes in v2: > > > - Don't use

Re: [libvirt PATCH v2 0/5] Add support for vDPA block devices

2023-09-12 Thread Jonathon Jongsma
On 9/12/23 7:00 AM, Peter Krempa wrote: On Mon, Sep 11, 2023 at 16:53:42 -0500, Jonathon Jongsma wrote: see https://bugzilla.redhat.com/show_bug.cgi?id=1900770. Changes in v2: - Don't use virStorageSource->path for vdpa device path to avoid clashing with existing path functionality -

Re: [libvirt PATCH v2 0/5] Add support for vDPA block devices

2023-09-12 Thread Peter Krempa
On Mon, Sep 11, 2023 at 16:53:42 -0500, Jonathon Jongsma wrote: > see https://bugzilla.redhat.com/show_bug.cgi?id=1900770. > > Changes in v2: > - Don't use virStorageSource->path for vdpa device path to avoid clashing > with >existing path functionality > - Move vdpa device opening to the

[libvirt PATCH v2 2/5] qemu: add virtio-blk-vhost-vdpa capability

2023-09-11 Thread Jonathon Jongsma
Check whether the qemu binary supports the vdpa block driver. We can't rely simply on the existence of the virtio-blk-vhost-vdpa block driver since the first releases of qemu didn't support fd-passing for this driver. So we have to check for the 'fdset' feature on the driver object. This feature

[libvirt PATCH v2 3/5] qemu: make vdpa connect function more generic

2023-09-11 Thread Jonathon Jongsma
qemuInterfaceVDPAConnect() was a helper function for connecting to the vdpa device file. But in order to support other vdpa devices besides network interfaces (e.g. vdpa block devices) make this function a bit more generic. Signed-off-by: Jonathon Jongsma Reviewed-by: Peter Krempa ---

[libvirt PATCH v2 4/5] qemu: consider vdpa block devices for memlock limits

2023-09-11 Thread Jonathon Jongsma
vDPA block devices will also need the same consideration for memlock limits as other vdpa devices, so consider these devices when calculating memlock limits. Signed-off-by: Jonathon Jongsma Reviewed-by: Peter Krempa --- src/qemu/qemu_domain.c | 12 ++-- 1 file changed, 10

[libvirt PATCH v2 1/5] conf: add ability to configure a vdpa block disk device

2023-09-11 Thread Jonathon Jongsma
vDPA block devices can be configured as follows: Signed-off-by: Jonathon Jongsma --- docs/formatdomain.rst | 19 +-- src/ch/ch_monitor.c | 1 + src/conf/domain_conf.c| 8 src/conf/schemas/domaincommon.rng | 13

[libvirt PATCH v2 5/5] qemu: Implement support for vDPA block devices

2023-09-11 Thread Jonathon Jongsma
Requires recent qemu with support for the virtio-blk-vhost-vdpa device and the ability to pass a /dev/fdset/N path for the vdpa path (8.1.0) Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1900770 Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_block.c | 20

[libvirt PATCH v2 0/5] Add support for vDPA block devices

2023-09-11 Thread Jonathon Jongsma
see https://bugzilla.redhat.com/show_bug.cgi?id=1900770. Changes in v2: - Don't use virStorageSource->path for vdpa device path to avoid clashing with existing path functionality - Move vdpa device opening to the qemuProcessPrepareHostStorageSource() function rather than the

Re: [libvirt PATCH v2 10/35] ci: build.sh: Add a wrapper function over the 'potfile' job

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:11PM +0200, Erik Skultety wrote: > This helper is a shell function transcript of its original GitLab CI > counterpart. There's one notable difference such that we pass '-j1' to > the meson compile command otherwise we'd have to execute the 'run_build' > function

Re: [libvirt PATCH v2 13/35] ci: build.sh: Drop changing working directory to CI_CONT_DIR

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:14PM +0200, Erik Skultety wrote: > Firstly, this would mangle with "sourcing" this file in either > execution environment later down the road. Secondly, we won't need this > as future ci/helper patches will generate a throwaway script that will > take care of a

  1   2   3   4   5   6   7   8   9   10   >