Re: [libvirt] [PATCH 8/8] qemu: driver: Remove semi-stale comment about asynchronous job abort

2019-07-23 Thread Ján Tomko
On Thu, Jul 18, 2019 at 06:31:43PM +0200, Peter Krempa wrote: Now that we track the job separately we watch only for the abort of the one single block job so the comment is no longer accurate. Also describing asynchronous operation is not really necessary. Signed-off-by: Peter Krempa ---

Re: [libvirt] [PATCH 7/8] qemu: Remove stale comment outlining how to extend qemuDomainBlockPivot

2019-07-23 Thread Ján Tomko
On Thu, Jul 18, 2019 at 06:31:42PM +0200, Peter Krempa wrote: With -blockdev: - we track the job and check it after restart - have the ability to ask qemu to persist it to collect result - have the ability to report errors. This solves all points the comment outlined so remove it. Also all

Re: [libvirt] [PATCH 6/8] qemu: driver: Blockdevize qemuDomainBlockJobAbort/Pivot

2019-07-23 Thread Ján Tomko
On Thu, Jul 18, 2019 at 06:31:41PM +0200, Peter Krempa wrote: Use job-complete/job-abort instead of the blockjob-* variants for blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) Reviewed-by: Ján Tomko

[libvirt] [PATCH 0/4] test_driver: implement IOThread related APIs

2019-07-23 Thread Ilias Stamatis
Ilias Stamatis (4): test_driver: implement virDomainAddIOThread test_driver: implement virDomainDelIOThread test_driver: implement virDomainPinIOThread test_driver: implement virDomainGetIOThreadInfo src/test/test_driver.c | 248 + 1 file changed,

[libvirt] [PATCH 2/4] test_driver: implement virDomainDelIOThread

2019-07-23 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 72 ++ 1 file changed, 72 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 313cf5e7ef..29262e4d34 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH 1/4] test_driver: implement virDomainAddIOThread

2019-07-23 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 51 ++ 1 file changed, 51 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2e33a9dd55..313cf5e7ef 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH 3/4] test_driver: implement virDomainPinIOThread

2019-07-23 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 51 ++ 1 file changed, 51 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 29262e4d34..47e28a01ec 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH 4/4] test_driver: implement virDomainGetIOThreadInfo

2019-07-23 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 47e28a01ec..4c6f3db8de 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH 2/2] test_driver: implement virDomainPinEmulator

2019-07-23 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 44 ++ 1 file changed, 44 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 235d70f793..5411a97a5b 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH 0/2] test_driver: implement emulator pinning APIs

2019-07-23 Thread Ilias Stamatis
Ilias Stamatis (2): test_driver: implement virDomainGetEmulatorPinInfo test_driver: implement virDomainPinEmulator src/test/test_driver.c | 92 ++ 1 file changed, 92 insertions(+) -- 2.22.0 -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH 1/2] test_driver: implement virDomainGetEmulatorPinInfo

2019-07-23 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 48 ++ 1 file changed, 48 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2e33a9dd55..235d70f793 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

[libvirt] [PATCH 1/7] qemu: command: Fix function name in comment

2019-07-23 Thread Peter Krempa
In commit 042c95bd194 qemuBuildStorageSourceChainAttachPrepareBlockdev was added but the comment for the function mentions qemuBuildStorageSourceChainAttachPrepareDrive. Fix the mistake. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1

[libvirt] [PATCH 5/7] qemu: block: Use simple backing stores string format if possible

2019-07-23 Thread Peter Krempa
In case when the backing store can be represented with something simpler such as an URI we can use it rather than falling back to the json: pseudo-protocol. In cases when it's not worth it (e.g. with the old ugly NBD or RBD strings let's switch to json). The function is exported as we'll need it

[libvirt] [PATCH 7/7] qemu: blockjob: Reset 'synchronous' block job handling flag prior to flushing events

2019-07-23 Thread Peter Krempa
When returning to asynchronous block job handling the flag which determines the handling method should be reset prior to flushing outstanding events. If there's an event to process the handler may invoke the monitor and another event may be received. We'd not process that one. Reset the flag

[libvirt] [PATCH 3/7] qemu: block: Add helper for generating snapshot transaction for -blockdev

2019-07-23 Thread Peter Krempa
For the modern use cases we are going to use 'blockdev-snapshot' instead of 'blockdev-snapshot-sync'. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 15 +++ src/qemu/qemu_block.h | 5 + 2 files changed, 20 insertions(+) diff --git a/src/qemu/qemu_block.c

[libvirt] [PATCH 6/7] qemu: snapshot: Initialize data for inactive config of snapshot earlier

2019-07-23 Thread Peter Krempa
qemuDomainSnapshotDiskDataCollect copies the source of the disk from the live config into the inactive config. Move this operation earlier so that if we initialize it for use for the particular instance the run-time-only data is not copied. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c

[libvirt] [PATCH 2/7] qemu: Add possibility to prepare top image only for attachment via blockdev

2019-07-23 Thread Peter Krempa
qemuBuildStorageSourceChainAttachPrepareBlockdev prepares the full backing chain for attachment via blockdev. For snapshots we'll need to prepare one image only as it needs to be plugged on top of the existing chain. This patch introduces qemuBuildStorageSourceChainAttachPrepareBlockdevTop which

[libvirt] [PATCH 4/7] qemu: Use virStorageSourceIsEmpty in qemuDomainBlockCommit

2019-07-23 Thread Peter Krempa
The block commit API checked 'disk->src->path' to see whether there is a reasonable disk source to be committed. As the top image can be e.g. backed by NBD the check is not good enough. Replace it by virStorageSourceIsEmpty. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 2 +- 1 file

[libvirt] [PATCH 0/7] qemu: Various blockdev-related fixes (blockdev-add saga)

2019-07-23 Thread Peter Krempa
Peter Krempa (7): qemu: command: Fix function name in comment qemu: Add possibility to prepare top image only for attachment via blockdev qemu: block: Add helper for generating snapshot transaction for -blockdev qemu: Use virStorageSourceIsEmpty in qemuDomainBlockCommit qemu:

Re: [libvirt] [PATCH 1/7] qemu: command: Fix function name in comment

2019-07-23 Thread Ján Tomko
On Tue, Jul 23, 2019 at 02:08:45PM +0200, Peter Krempa wrote: In commit 042c95bd194 qemuBuildStorageSourceChainAttachPrepareBlockdev was added but the comment for the function mentions qemuBuildStorageSourceChainAttachPrepareDrive. Fix the mistake. Signed-off-by: Peter Krempa ---

[libvirt] [dockerfiles PATCH 2/4] refresh: Learn how to deal with the project's name

2019-07-23 Thread Fabiano Fidêncio
Let's change the refresh script in order to take into consideration Dockerfiles containing the project's name. This is needed in order to add different projects to libvirt-dockerfiles. An important change that deservers a mention here is that the PROJECTS variable, part of Dockerfile class, has

[libvirt] [dockerfiles PATCH 3/4] refresh: Add libosinfo project

2019-07-23 Thread Fabiano Fidêncio
libosinfo Dockerfile will consist on a single container that will be able to build & test libosinfo, osinfo-db-tools, and osinfo-db. And from those "subprojects", only libosinfo and osinfo-db-tools are subject for mingw builds. Signed-off-by: Fabiano Fidêncio --- refresh | 5 + 1 file

[libvirt] [dockerfiles PATCH 4/4] Add Dockerfiles for libosinfo project

2019-07-23 Thread Fabiano Fidêncio
The corresponding libvirt-jenkins-ci commit is 6bb57940d83a9ad. Signed-off-by: Fabiano Fidêncio --- buildenv-libosinfo-centos-7.Dockerfile| 44 + ...bosinfo-debian-10-cross-aarch64.Dockerfile | 65 +++ ...ibosinfo-debian-10-cross-armv6l.Dockerfile | 65

[libvirt] [dockerfiles PATCH 0/4] Add libosinfo Dockerfiles

2019-07-23 Thread Fabiano Fidêncio
This patch series aims to add libosinfo Dockerfiles to this project, so those containers can be used by libosinfo projects' gitlab CI. Please, take a look at each patch for more context of what has been done. Fabiano Fidêncio (4): refresh: Fix typo: ingores -> ignored refresh: Learn how to

[libvirt] [dockerfiles PATCH 1/4] refresh: Fix typo: ingores -> ignored

2019-07-23 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- refresh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refresh b/refresh index 1db0fc8..aa056af 100755 --- a/refresh +++ b/refresh @@ -34,7 +34,7 @@ class Dockerfile: def __init__(self, path): # Files that don't end with

[libvirt] [PATCH 00/41] Split the libvirtd daemon into per-driver daemons

2019-07-23 Thread Daniel P . Berrangé
This is what all the driver refactoring I've done has been about enabling. We gain new daemons for each driver, for the primary virt drivers: virtlibxld virtlxcd virtqemud virtvboxd virtvzd And again for the secondary drivers virtinterfaced virtnetworkd virtnodedevd

[libvirt] [PATCH 01/41] build: make augeas-gentest.pl write to stdout

2019-07-23 Thread Daniel P . Berrangé
The augeas-gentest.pl program merges a config file into a augeas file, saving the output to a new file. It is going to be useful to further process the output file, and it would be easier if this can be done with a pipeline, so change augeas-gentest.pl to write to stdout instead of a file.

[libvirt] [PATCH 05/41] build: centralize rule for handling generated config files

2019-07-23 Thread Daniel P . Berrangé
Instead of adding generated config files to CLEANFILES and BUILT_SOURCES in each makefile, add them all at once. Signed-off-by: Daniel P. Berrangé --- src/Makefile.am | 3 +++ src/locking/Makefile.inc.am | 8 2 files changed, 3 insertions(+), 8 deletions(-) diff --git

[libvirt] [PATCH 06/41] remote: stop trying to print help as giant blocks of text

2019-07-23 Thread Daniel P . Berrangé
The remote daemon tries to print out its help text in a couple of giant blocks of text. This has already lead to duplication of the text for the privileged vs unprivileged execution mode. With the introduction of more daemons, this text is going to be duplicated many more times with small

[libvirt] [PATCH 04/41] build: use a common rule for checking augeas test data files

2019-07-23 Thread Daniel P . Berrangé
Instead of each subdir containing its own custom rule for checking the augeas tests, use common rule for all. The new rule searches both src + build dirs for include files, since some augeas files will be auto-generated very shortly. Signed-off-by: Daniel P. Berrangé --- src/Makefile.am

[libvirt] [PATCH 02/41] build: create all augeas test files in same dir as their source

2019-07-23 Thread Daniel P . Berrangé
The current make rules are inconsistent about which directory the augeas test files are created in. Put them all in the same dir as their source. Signed-off-by: Daniel P. Berrangé --- .gitignore | 8 +--- src/bhyve/Makefile.inc.am | 9 +

[libvirt] [PATCH 03/41] build: collapse rules adding augeas tests to CLEANFILES

2019-07-23 Thread Daniel P . Berrangé
We already have a variable that lists all augeas test files, so we can add everything to CLEANFILES at once. --- src/Makefile.am | 1 + src/bhyve/Makefile.inc.am | 1 - src/libxl/Makefile.inc.am | 1 - src/locking/Makefile.inc.am | 5 + src/logging/Makefile.inc.am | 3 ---

[libvirt] [PATCH 10/41] remote: conditionalize IP socket usage in libvirtd daemon

2019-07-23 Thread Daniel P . Berrangé
Prepare for reusing libvirtd source to create other daemons by making the use of IP sockets conditionally defined by the make rules. The main libvirtd daemon will retain IP listen ability, but all the driver specific daemons will be local UNIX sockets only. Apps needing IP connectivity will

[libvirt] [PATCH 09/41] remote: conditionalize driver loading in libvirtd daemon

2019-07-23 Thread Daniel P . Berrangé
Prepare for reusing libvirtd source to create other daemons by making the driver(s) to load conditionally defined by the make rules. If nothing is set, all drivers will be loaded, ignoring any missing ones as historically done. If MODULE_NAME is set only one driver will be loaded and that one

[libvirt] [PATCH 08/41] remote: conditionalize daemon name in libvirtd daemon

2019-07-23 Thread Daniel P . Berrangé
Prepare for reusing libvirtd source to create other daemons by making the daemon name conditionally defined by the make rules. Signed-off-by: Daniel P. Berrangé --- src/remote/Makefile.inc.am| 1 + src/remote/remote_daemon.c| 48 +--

Re: [libvirt] [PATCH 4/4] tests: Avoid possible error in testExecRestart

2019-07-23 Thread Peter Krempa
On Tue, Jul 23, 2019 at 09:58:11 -0400, John Ferlan wrote: > If the dup2 fails, then we aren't going to get the correct result. > > Found by Coverity > > Signed-off-by: John Ferlan > --- > tests/virnetdaemontest.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git

Re: [libvirt] Problem with version 5.5.x

2019-07-23 Thread Raghav Gururajan
IN CONTINUATION TO MY PREVIOUS EMAIL IN THIS THREAD: The virt-manager gives out the following error: Unable to complete install: 'Unable to read from '/sys/fs/cgroup/unified/machine/cgroup.controllers': No such file or directory' Traceback (most recent call last): File

[libvirt] [PATCH 16/41] remote: conditionalize systemd socket unit files

2019-07-23 Thread Daniel P . Berrangé
Prepare for reusing libvirtd socket unit files with other daemons by making various parts of their config conditionally defined by the make rules. Signed-off-by: Daniel P. Berrangé --- src/remote/Makefile.inc.am | 3 +++ src/remote/libvirtd-admin.socket.in | 15 ---

[libvirt] [PATCH 14/41] remote: don't hardcode /etc in the systemd units

2019-07-23 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/remote/Makefile.inc.am | 5 + src/remote/libvirtd-admin.socket.in | 2 +- src/remote/libvirtd-ro.socket.in| 2 +- src/remote/libvirtd-tcp.socket.in | 2 +- src/remote/libvirtd-tls.socket.in | 2 +- src/remote/libvirtd.service.in

[libvirt] [PATCH 12/41] remote: conditionalize IP socket config in augeas definitions

2019-07-23 Thread Daniel P . Berrangé
Prepare for reusing libvirtd augeas defintions with other daemons by making the config parameters for IP sockets conditionally defined by the make rules. Signed-off-by: Daniel P. Berrangé --- .gitignore | 1 + build-aux/augeas-gentest.pl | 2

[libvirt] [PATCH 17/41] remote: refactor how list of systemd unit files is built

2019-07-23 Thread Daniel P . Berrangé
The make logic assumes that the SYSTEMD_UNIT_FILES var can be built from SYSTEMD_UNIT_FILES_IN by simply dropping the directory prefix and the .in suffix. This won't work in future when a single .in unit file can be used to generate multiple different units. Signed-off-by: Daniel P. Berrangé

[libvirt] [PATCH 13/41] remote: refactor & rename variables for building libvirtd

2019-07-23 Thread Daniel P . Berrangé
The same make variables will be useful for building both libvirtd and the split daemons, so refactor & rename variables to facilitate reuse. Automake gets annoyed if you define a variable ending LDFLAGS: src/remote/Makefile.inc.am:53: warning: variable 'REMOTE_DAEMON_LDFLAGS' is defined but no

[libvirt] [PATCH 18/41] remote: in per-driver daemons ensure that state initialize succeeds

2019-07-23 Thread Daniel P . Berrangé
When running in libvirtd, we are happy for any of the drivers to simply skip their initialization in virStateInitialize, as other drivers are still potentially useful. When running in per-driver daemons though, we want the daemon to abort startup if the driver cannot initialize itself, as the

[libvirt] [PATCH 07/41] remote: conditionalize socket names in libvirtd daemon

2019-07-23 Thread Daniel P . Berrangé
Prepare for reusing libvirtd source to create other daemons by making the socket names conditionally defined by the make rules. Signed-off-by: Daniel P. Berrangé --- src/remote/Makefile.inc.am | 1 + src/remote/remote_daemon.c | 24 2 files changed, 13 insertions(+),

[libvirt] [PATCH 11/41] remote: conditionalize IP socket config in libvirtd.conf

2019-07-23 Thread Daniel P . Berrangé
Prepare for reusing libvirtd config to create other daemons by making the config parameters for IP sockets conditionally defined by the make rules. The main libvirtd daemon will retain IP listen ability, but all the driver specific daemons will be local UNIX sockets only. Apps needing IP

[libvirt] [PATCH 15/41] remote: reduce duplication in systemd unit file make rules into one

2019-07-23 Thread Daniel P . Berrangé
The make rules for the systemd socket unit files are all essentially identical and can be collapsed into a single generic rule. The service unit file rule can be simplified too. Signed-off-by: Daniel P. Berrangé --- src/Makefile.am| 6 + src/remote/Makefile.inc.am | 47

[libvirt] [PATCH 20/41] secret: introduce virtsecretd daemon

2019-07-23 Thread Daniel P . Berrangé
The virtsecretd daemon will be responsible for providing the secret API driver functionality. The secret driver is still loaded by the main libvirtd daemon at this stage, so virtsecretd must not be running at the same time. Signed-off-by: Daniel P. Berrangé --- .gitignore

[libvirt] [PATCH 19/41] remote: introduce virtproxyd daemon to handle IP connectivity

2019-07-23 Thread Daniel P . Berrangé
The libvirtd daemon provides the traditional libvirt experience where all the drivers are in a single daemon, and is accessible over both local UNIX sockets and remote IP sockets. In the new world we're having a set of per-driver daemons which will primarily be accessed locally via their own UNIX

[libvirt] Problem with version 5.5.x

2019-07-23 Thread Raghav Gururajan
Hello Folks! The distro I use (Guix System) has updated it's libvirt version from 5.4.x to 5.5.x, few days ago. After the update, there is this following error: "libvirt.libvirtError: Unable to read from '/sys/fs/cgroup/unified/machine/cgroup.controllers': No such file or directory". It appears

Re: [libvirt] [PATCH 0/4] Couple of recent things from Coverity

2019-07-23 Thread Peter Krempa
On Tue, Jul 23, 2019 at 09:58:07 -0400, John Ferlan wrote: > Some patches from recent changes for things Coverity has complained about > > John Ferlan (4): > qemu: Remove unnecessary check in qemuMonitorJSONGetJobInfoOne > test: Return early in testQueryJobs > util: Avoid possible error in

[libvirt] [PATCH 39/41] remote: refactor the code for choosing the UNIX socket path

2019-07-23 Thread Daniel P . Berrangé
The ssh, libssh, libssh2 & unix transports all need to use a UNIX socket path, and duplicate some of the same logic for error checking. Pull this out into a separate method to increase code sharing. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 111

[libvirt] [PATCH 35/41] remote: change hand written methods to not directly access connection

2019-07-23 Thread Daniel P . Berrangé
The driver dispatch methods access the priv->conn variables directly. In future we want to dynamically open the connections for the secondary driver. Thus we want the methods to call a method to get the connection handle instead of assuming the private variable is non-NULL. Signed-off-by: Daniel

[libvirt] [PATCH 38/41] remote: use enum helpers for parsing remote driver transport

2019-07-23 Thread Daniel P . Berrangé
Instead of open-coding a string -> enum conversion, use the enum helpers for the remote driver transport. The old code uses STRCASEEQ, so we must force the URI transport to lowercase for sake of back-compatibility. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_driver.c | 112

[libvirt] [PATCH 41/41] libvirt: correctly print out URI returned from probing

2019-07-23 Thread Daniel P . Berrangé
Turning a NULL URI instead the empty string is very misleading when reading the debug logs as the distinction between the two is functionally important. Signed-off-by: Daniel P. Berrangé --- src/libvirt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt.c

[libvirt] [PATCH 36/41] remote: open secondary drivers via remote driver if needed

2019-07-23 Thread Daniel P . Berrangé
When the client has a connection to one of the hypervisor specific daemons (eg virtqemud), the app may still expect to use the secondary driver APIs (storage, network, etc). None of these will be registered in the hypervisor daemon, so we must explicitly open a connection to each of the daemons

[libvirt] [PATCH 26/41] libxl: introduce virtxend daemon

2019-07-23 Thread Daniel P . Berrangé
The virtxend daemon will be responsible for providing the libxl API driver functionality. The libxl driver is still loaded by the main libvirtd daemon at this stage, so virtxend must not be running at the same time. This naming is slightly different than other drivers. With the libxl driver, the

[libvirt] [PATCH 28/41] lxc: introduce virtlxcd daemon

2019-07-23 Thread Daniel P . Berrangé
The virtlxcd daemon will be responsible for providing the lxc API driver functionality. The lxc driver is still loaded by the main libvirtd daemon at this stage, so virtlxcd must not be running at the same time. Signed-off-by: Daniel P. Berrangé --- .gitignore | 4 +++

[libvirt] [PATCH 31/41] vz: introduce virtvzd daemon

2019-07-23 Thread Daniel P . Berrangé
The virtvzd daemon will be responsible for providing the vz API driver functionality. The vz driver is still loaded by the main libvirtd daemon at this stage, so virtvzd must not be running at the same time. Signed-off-by: Daniel P. Berrangé --- .gitignore| 4 +++

[libvirt] [PATCH 33/41] remote: get rid of bogus ATTRIBUTE_UNUSED annotation client param

2019-07-23 Thread Daniel P . Berrangé
The client parameter is always used to get access to the private data struct. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 98 ++--- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/src/remote/remote_daemon_dispatch.c

[libvirt] [PATCH 25/41] nwfilter: introduce virtnwfilterd daemon

2019-07-23 Thread Daniel P . Berrangé
The virtnwfilterd daemon will be responsible for providing the nwfilter API driver functionality. The nwfilter driver is still loaded by the main libvirtd daemon at this stage, so virtnwfilterd must not be running at the same time. Signed-off-by: Daniel P. Berrangé --- .gitignore

[libvirt] [PATCH 34/41] remote: change generated methods to not directly access connection

2019-07-23 Thread Daniel P . Berrangé
The driver dispatch methods access the priv->conn variables directly. In future we want to dynamically open the connections for the secondary driver. Thus we want the methods to call a method to get the connection handle instead of assuming the private variable is non-NULL. Signed-off-by: Daniel

[libvirt] [PATCH 22/41] interface: introduce virtinterfaced daemon

2019-07-23 Thread Daniel P . Berrangé
The virtinterfaced daemon will be responsible for providing the interface API driver functionality. The interface driver is still loaded by the main libvirtd daemon at this stage, so virtinterfaced must not be running at the same time. Signed-off-by: Daniel P. Berrangé --- .gitignore

[libvirt] [PATCH 27/41] qemu: introduce virtqemud daemon

2019-07-23 Thread Daniel P . Berrangé
The virtqemud daemon will be responsible for providing the qemu API driver functionality. The qemu driver is still loaded by the main libvirtd daemon at this stage, so virtqemud must not be running at the same time. Signed-off-by: Daniel P. Berrangé --- .gitignore| 4 +++

[libvirt] [PATCH 40/41] remote: switch to connect to per-driver daemons by default

2019-07-23 Thread Daniel P . Berrangé
Historically URIs handled by the remote driver will always connect to the libvirtd UNIX socket. There will now be one daemon per driver, and each of these has its own UNIX sockets to connect to. It will still be possible to run the traditional monolithic libvirtd though, which will have the

[libvirt] [PATCH 21/41] network: introduce virtnetworkd daemon

2019-07-23 Thread Daniel P . Berrangé
The virtnetworkd daemon will be responsible for providing the network API driver functionality. The network driver is still loaded by the main libvirtd daemon at this stage, so virtnetworkd must not be running at the same time. Signed-off-by: Daniel P. Berrangé --- .gitignore

[libvirt] [PATCH 23/41] storage: introduce virtstoraged daemon

2019-07-23 Thread Daniel P . Berrangé
The virtstoraged daemon will be responsible for providing the storage API driver functionality. The storage driver is still loaded by the main libvirtd daemon at this stage, so virtstoraged must not be running at the same time. Signed-off-by: Daniel P. Berrangé --- .gitignore

[libvirt] [PATCH 30/41] bhyve: introduce virtbhyved daemon

2019-07-23 Thread Daniel P . Berrangé
The virtbhyved daemon will be responsible for providing the bhyve API driver functionality. The bhyve driver is still loaded by the main libvirtd daemon at this stage, so virtbhyved must not be running at the same time. Signed-off-by: Daniel P. Berrangé --- .gitignore| 4

[libvirt] [PATCH 37/41] remote: handle autoprobing of driver within virtproxyd

2019-07-23 Thread Daniel P . Berrangé
The virtproxyd daemon is merely responsible for forwarding RPC calls to one of the other per-driver daemons. As such, it does not have any drivers loaded and so regular auto-probing logic will not work. We need it to be able to handle NULL URIs though, so must implement some kind of alternative

[libvirt] [PATCH 32/41] admin: add ability to connect to the per-driver daemon sockets

2019-07-23 Thread Daniel P . Berrangé
The admin client now supports addressing the per-driver daemons using the obvious URI schemes for each daemon. eg virtqemud:///system virtqemud:///session, etc. Signed-off-by: Daniel P. Berrangé --- src/libvirt-admin.c | 32 +++- 1 file changed, 15 insertions(+), 17

[libvirt] [PATCH 29/41] vbox: introduce virtvboxd daemon

2019-07-23 Thread Daniel P . Berrangé
The virtvboxd daemon will be responsible for providing the vbox API driver functionality. The vbox driver is still loaded by the main libvirtd daemon at this stage, so virtvboxd must not be running at the same time. Signed-off-by: Daniel P. Berrangé --- .gitignore| 4 +++

[libvirt] [PATCH 24/41] nodedev: introduce virtnodedevd daemon

2019-07-23 Thread Daniel P . Berrangé
The virtnodedevd daemon will be responsible for providing the nodedev API driver functionality. The nodedev driver is still loaded by the main libvirtd daemon at this stage, so virtnodedevd must not be running at the same time. Signed-off-by: Daniel P. Berrangé --- .gitignore

[libvirt] [PATCH 0/4] Couple of recent things from Coverity

2019-07-23 Thread John Ferlan
Some patches from recent changes for things Coverity has complained about John Ferlan (4): qemu: Remove unnecessary check in qemuMonitorJSONGetJobInfoOne test: Return early in testQueryJobs util: Avoid possible error in virCommandMassClose tests: Avoid possible error in testExecRestart

[libvirt] [PATCH 1/4] qemu: Remove unnecessary check in qemuMonitorJSONGetJobInfoOne

2019-07-23 Thread John Ferlan
It's already dereffed in the initialization and shouldn't be NULL unless virJSONValueArraySize after a virJSONValueObjectGetArray could return a NULL data entry. Found by Coverity Signed-off-by: John Ferlan --- src/qemu/qemu_monitor_json.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[libvirt] [PATCH 2/4] test: Return early in testQueryJobs

2019-07-23 Thread John Ferlan
Avoid the chance that qemuMonitorTestNewSimple could return NULL Found by Coverity Signed-off-by: John Ferlan --- tests/qemumonitorjsontest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 8eb9d2e01b..bf89f49aca 100644 ---

[libvirt] [PATCH 4/4] tests: Avoid possible error in testExecRestart

2019-07-23 Thread John Ferlan
If the dup2 fails, then we aren't going to get the correct result. Found by Coverity Signed-off-by: John Ferlan --- tests/virnetdaemontest.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index

[libvirt] [PATCH 3/4] util: Avoid possible error in virCommandMassClose

2019-07-23 Thread John Ferlan
Avoid the chance that sysconf(_SC_OPEN_MAX) returns -1 and thus would cause virBitmapNew would attempt to allocate a very large bitmap. Found by Coverity Signed-off-by: John Ferlan --- src/util/vircommand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH 3/4] util: Avoid possible error in virCommandMassClose

2019-07-23 Thread Peter Krempa
On Tue, Jul 23, 2019 at 09:58:10 -0400, John Ferlan wrote: > Avoid the chance that sysconf(_SC_OPEN_MAX) returns -1 and thus > would cause virBitmapNew would attempt to allocate a very large > bitmap. > > Found by Coverity > > Signed-off-by: John Ferlan > --- > src/util/vircommand.c | 2 +- >

[libvirt] [PATCH v10 18/19] backup: Wire up qemu checkpoint commands over QMP

2019-07-23 Thread Eric Blake
Time to actually issue the QMP transactions that create and delete persistent checkpoints. For create, we only need one transaction: inside, we visit all disks affected by the checkpoint, and create a new enabled bitmap, as well as disabling the bitmap of the first ancestor checkpoint (if any)

[libvirt] [PATCH v10 19/19] backup: Prevent snapshots and checkpoints at same time

2019-07-23 Thread Eric Blake
Earlier patches mentioned that the initial implementation will prevent snapshots and checkpoints from being used on the same domain at once. However, the actual restriction is done in this separate patch to make it easier to lift that restriction via a revert, when we are finally ready to tackle

[libvirt] [PATCH v10 14/19] backup: Add virsh-checkpoints test

2019-07-23 Thread Eric Blake
Similar to virsh-snapshots (which also gets a minor tweak, to prove we properly lock out one API from the other until later integration efforts figure out the best way to proceed). Provides decent coverage of the checkpoint API, the test driver implementation, and the virsh access to the API.

[libvirt] [PATCH v10 17/19] backup: qemu: Add helper API for looking up node name

2019-07-23 Thread Eric Blake
Qemu bitmap operations require knowing the node name associated with the format layer (the qcow2 file); as upcoming patches will be grabbing that information frequently, make a helper function to access it. Signed-off-by: Eric Blake --- src/qemu/qemu_domain.h | 3 +++ src/qemu/qemu_domain.c |

[libvirt] [PATCH v10 11/19] backup: Implement checkpoint APIs for remote driver

2019-07-23 Thread Eric Blake
The remote code generator had to be taught about the new virDomainCheckpointPtr type, at which point the remote driver code for checkpoints can be generated. Signed-off-by: Eric Blake Reviewed-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 20 +

[libvirt] [PATCH v10 12/19] backup: Implement virsh support for checkpoints

2019-07-23 Thread Eric Blake
Introduce a bunch of new virsh commands for managing checkpoints in isolation. More commands are needed for performing incremental backups, but these commands were easy to implement by modeling heavily after virsh-snapshot.c. There is no need for checkpoint-revert or checkpoint-current since those

[libvirt] [PATCH v10 13/19] backup: test: Implement metadata tracking for checkpoint APIs

2019-07-23 Thread Eric Blake
A lot of this work heavily copies from the existing snapshot APIs. The test driver doesn't really have to do anything more than just expose an interface into libvirt metadata, making it possible to test saving and restoring XML, and tracking relations between multiple checkpoints. Signed-off-by:

[libvirt] [PATCH v10 00/19] Checkpoint APIs (incremental backup saga)

2019-07-23 Thread Eric Blake
This is a subset of v10 of incremental backup, fixing Peter's review comments from v9 (and even some from v8 that I had missed earlier). There's still a lot more rebasing churn to resolve in the backup portion of the series before I can post a full backup-v10 label. There's still a decision to

[libvirt] [PATCH v10 07/19] backup: Document nuances between different state capture APIs

2019-07-23 Thread Eric Blake
Now that various new API have been added or are coming soon, it is worth a landing page that gives an overview of capturing various pieces of guest state, and which APIs are best suited to which tasks. Signed-off-by: Eric Blake Reviewed-by: John Ferlan Reviewed-by: Daniel P. Berrangé ---

[libvirt] [PATCH v10 08/19] backup: Parse and output checkpoint XML

2019-07-23 Thread Eric Blake
Add a new file checkpoint_conf.c that performs the translation to and from new XML describing a checkpoint. The code shares a common base class with snapshots, since a checkpoint similarly represents the domain state at a moment in time. Add some basic testing of round trip XML handling through

[libvirt] [PATCH v10 06/19] backup: Introduce virDomainCheckpoint APIs

2019-07-23 Thread Eric Blake
Introduce a bunch of new public APIs related to backup checkpoints. Checkpoints are modeled heavily after virDomainSnapshotPtr (both represent a point in time of the guest), although a snapshot exists with the intent of rolling back to that state, while a checkpoint exists to make it possible to

[libvirt] [PATCH v10 05/19] backup: Document new XML for checkpoints

2019-07-23 Thread Eric Blake
Prepare for new checkpoint APIs by describing the XML that will represent a checkpoint. The checkpoint XML is modeled heavily after virDomainSnapshotPtr. See the docs for more details. Add testsuite coverage for some minimal uses of the XML (bare minimum, the sample from html, and a full

[libvirt] [PATCH v10 01/19] snapshot: Don't leak moment obj list metaroot to callers

2019-07-23 Thread Eric Blake
virDomainSnapshotFindByName(list, NULL) should return NULL, rather than the internal-use-only metaroot. Most existing callers pass in a non-NULL name; the few that don't are immediately calling virDomainMomentSetParent (which indeed needs the metaroot if the parent name is NULL); but as the leak

[libvirt] [PATCH v10 04/19] backup: qemu: Detect node names at domain startup

2019-07-23 Thread Eric Blake
If we are using -blockdev, then node names are always available (because we set them). But when not using it, we were scraping node names after reconnecting a new libvirtd to an existing guest (see qemuProcessReconnect), and after any block job that may have changed the set of node names we care

[libvirt] [PATCH v10 09/19] backup: Allow for lists of checkpoint objects

2019-07-23 Thread Eric Blake
Create a new file for managing a list of checkpoint objects, borrowing heavily from existing virDomainSnapshotObjList paradigms. Note that while snapshots definitely have a use case for multiple children to a single parent (create a base snapshot, create a child snapshot, revert to the base, then

[libvirt] [PATCH v10 15/19] backup: qemu: Add directory for tracking checkpoints

2019-07-23 Thread Eric Blake
This is similar to the existing directory for snapshots; the domain will save one xml file per checkpoint, for reloading on the next libvirtd restart. Fortunately, since checkpoints mandate RNG validation, we are assured that the checkpoint name will be usable as a file name (no abuse of

[libvirt] [PATCH v10 16/19] backup: qemu: Implement metadata tracking for checkpoint APIs

2019-07-23 Thread Eric Blake
A lot of this work heavily copies from the existing snapshot APIs. The interaction with qemu during create/delete still needs to be implemented, but this takes care of all the libvirt metadata (saving and restoring XML, and tracking the relations between multiple checkpoints). Signed-off-by:

[libvirt] [PATCH v10 10/19] backup: Add new domain:checkpoint access control

2019-07-23 Thread Eric Blake
Creating a checkpoint does not modify guest-visible state, but does modify host resources. Rather than reuse existing domain:write, domain:block_write, or domain:snapshot access controls, it seems better to introduce a new access control specific to tasks related to checkpoints and incremental

[libvirt] [PATCH v10 02/19] snapshot: Saner error message for duplicate create

2019-07-23 Thread Eric Blake
Any message that is easy to trigger (as evidenced by the testsuite update) should not use 'internal error' as its category. Signed-off-by: Eric Blake --- src/conf/virdomainmomentobjlist.c | 4 ++-- tests/virsh-snapshot | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff

[libvirt] [PATCH v10 03/19] snapshot: Documentation and comment improvements

2019-07-23 Thread Eric Blake
Changes noticed while copying to similar aspects of checkpoints. Signed-off-by: Eric Blake --- docs/formatsnapshot.html.in | 8 +++- tests/virsh-snapshot| 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/formatsnapshot.html.in b/docs/formatsnapshot.html.in

Re: [libvirt] [Qemu-devel] [PATCH v3] qapi: add dirty-bitmaps to query-named-block-nodes result

2019-07-23 Thread Markus Armbruster
John Snow writes: > From: Vladimir Sementsov-Ogievskiy > > Let's add a possibility to query dirty-bitmaps not only on root nodes. > It is useful when dealing both with snapshots and incremental backups. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > [Added deprecation information. --js] >

Re: [libvirt] [PATCH v9 11/13] backup: qemu: Implement metadata tracking for checkpoint APIs

2019-07-23 Thread Eric Blake
On 7/8/19 11:33 AM, Peter Krempa wrote: > On Sat, Jul 06, 2019 at 22:56:11 -0500, Eric Blake wrote: >> A lot of this work heavily copies from the existing snapshot >> APIs. The interaction with qemu during create/delete still >> needs to be implemented, but this takes care of all the libvirt >>

[libvirt] [PATCH v2 3/3] virhostdev: introduce virHostdevReattachAllPCIDevices

2019-07-23 Thread Daniel Henrique Barboza
This code that executes virPCIDeviceReattach in all virPCIDevicePtr objects of a given virPCIDeviceListPtr list is replicated twice in the code. Putting it in a helper function helps with readability. Signed-off-by: Daniel Henrique Barboza --- src/util/virhostdev.c | 74

  1   2   >