Re: [libvirt] [PATCH v3 08/11] driver.c: change URI validation to handle QEMU and vbox case

2019-09-25 Thread Cole Robinson
On 9/25/19 9:50 AM, Daniel Henrique Barboza wrote: The existing QEMU and vbox URI path validation consider that a privileged user can use both a "/system" and a "/session" URI. This differs from all the other drivers that forbids the root user to use "/session" URI. Let's update

Re: [libvirt] [PATCH 0/2] conf: refresh network ports missing from network driver

2019-09-25 Thread Laine Stump
ping On 9/21/19 7:59 PM, Laine Stump wrote: Patch 2/2 is the actual fix. 1/2 is just to make the fix simpler. NB: these two patches should also be included with the other patches for https://bugzilla.redhat.com/1745815 Laine Stump (2): conf: take advantage of VIR_AUTO* in

[libvirt] [PATCH] conf: utility function to update entry in def->nets array

2019-09-25 Thread Laine Stump
A virDomainNetDef object in a domain's nets array might contain a virDomainHostdevDef, and when this is the case, the domain's hostdevs array will also have a pointer to this embedded hostdev (this is done so that internal functions that need to perform some operation on all hostdevs won't leave

[libvirt] [libvirt-rust PATCH 1/1] Make creating safe wrapper from raw pointer unsafe

2019-09-25 Thread Linus Färnstrand
Giving an invalid pointer to the safe wrapper types causes undefined behavior when methods are later called on said wrapper Properly document safety contract of using unsafe constructor --- src/connect.rs | 10 -- src/domain.rs | 10 -- src/domain_snapshot.rs |

[libvirt] [libvirt-rust PATCH 0/1] Fix unsoundness in wrapper new constructor

2019-09-25 Thread Linus Färnstrand
There are safety issues with all wrapper type constructors. All safe wrappers can be created without `unsafe` from raw pointers. Meaning any subsequent use will cause undefined behavior if the pointer does not point to a valid object: ```rust // This will segfault / Cause undefined behavior

Re: [libvirt] QEMU bitmap backup usability FAQ

2019-09-25 Thread John Snow
On 9/25/19 11:11 AM, Vladimir Sementsov-Ogievskiy wrote: > 25.09.2019 16:52, John Snow wrote: >> >> >> On 8/20/19 6:25 PM, John Snow wrote: >>> Hi, downstream here at Red Hat I've been fielding some questions about >>> the usability and feature readiness of Bitmaps (and related features) in >>>

Re: [libvirt] QEMU bitmap backup usability FAQ

2019-09-25 Thread Vladimir Sementsov-Ogievskiy
25.09.2019 16:52, John Snow wrote: > > > On 8/20/19 6:25 PM, John Snow wrote: >> Hi, downstream here at Red Hat I've been fielding some questions about >> the usability and feature readiness of Bitmaps (and related features) in >> QEMU. >> >> Here are some questions I answered internally that I

[libvirt] [jenkins-ci PATCH] jenkins: Don't try to build libosinfo on Debian sid

2019-09-25 Thread Andrea Bolognani
We support the platform as a target for lcitool-driven builds, but we don't have a corresponding worker in the CentOS CI environment. Signed-off-by: Andrea Bolognani --- Pushed as a fix to the CI environment. jenkins/projects/libosinfo.yaml | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [libvirt] [PATCH v3 02/22] build-aux: rewrite augest test generator in Python

2019-09-25 Thread Daniel P . Berrangé
On Wed, Sep 25, 2019 at 03:25:39PM +0200, Ján Tomko wrote: > On Tue, Sep 24, 2019 at 03:58:43PM +0100, Daniel P. Berrangé wrote: > > As part of an goal to eliminate Perl from libvirt build tools, > > rewrite the augeas-gentest.pl tool in Python. > > > > This was a straight conversion, manually

Re: [libvirt] QEMU bitmap backup usability FAQ

2019-09-25 Thread John Snow
On 8/20/19 6:25 PM, John Snow wrote: > Hi, downstream here at Red Hat I've been fielding some questions about > the usability and feature readiness of Bitmaps (and related features) in > QEMU. > > Here are some questions I answered internally that I am copying to the > list for two reasons: >

[libvirt] [PATCH v3 08/11] driver.c: change URI validation to handle QEMU and vbox case

2019-09-25 Thread Daniel Henrique Barboza
The existing QEMU and vbox URI path validation consider that a privileged user can use both a "/system" and a "/session" URI. This differs from all the other drivers that forbids the root user to use "/session" URI. Let's update virConnectValidateURIPath() to handle these cases as exceptions,

[libvirt] [PATCH v3 10/11] vbox_common.c: use virConnectValidateURIPath()

2019-09-25 Thread Daniel Henrique Barboza
Suggested-by: Cole Robinson Signed-off-by: Daniel Henrique Barboza --- src/vbox/vbox_common.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index ddabcb80ca..d3b8fb625f 100644 --- a/src/vbox/vbox_common.c

[libvirt] [PATCH v3 07/11] storage_driver.c: use virConnectValidateURIPath()

2019-09-25 Thread Daniel Henrique Barboza
Suggested-by: Cole Robinson Signed-off-by: Daniel Henrique Barboza --- src/storage/storage_driver.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index ce10b55ed0..d160ff34fe 100644 ---

[libvirt] [PATCH v3 04/11] bridge_driver.c: virConnectValidateURIPath()

2019-09-25 Thread Daniel Henrique Barboza
Suggested-by: Cole Robinson Signed-off-by: Daniel Henrique Barboza --- src/network/bridge_driver.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index c54be96407..c617bbb58f 100644 ---

[libvirt] [PATCH v3 02/11] interface_backend_netcf.c: use virConnectValidateURIPath()

2019-09-25 Thread Daniel Henrique Barboza
Suggested-by: Cole Robinson Signed-off-by: Daniel Henrique Barboza --- src/interface/interface_backend_netcf.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interface_backend_netcf.c index

[libvirt] [PATCH v3 11/11] vbox_driver.c: use virConnectValidateURIPath()

2019-09-25 Thread Daniel Henrique Barboza
Suggested-by: Cole Robinson Signed-off-by: Daniel Henrique Barboza --- src/vbox/vbox_driver.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c index 1f31fa28df..d7e80828ab 100644 --- a/src/vbox/vbox_driver.c

[libvirt] [PATCH v3 01/11] src/driver.c: add virConnectValidateURIPath()

2019-09-25 Thread Daniel Henrique Barboza
The code to validate the URI path is repeated across several files. This patch creates a common validation code to be used across all of them. Suggested-by: Cole Robinson Signed-off-by: Daniel Henrique Barboza --- src/driver.c | 24 src/driver.h

[libvirt] [PATCH v3 09/11] qemu_driver.c: use virConnectValidateURIPath()

2019-09-25 Thread Daniel Henrique Barboza
Suggested-by: Cole Robinson Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index db4b39dc9e..abd1533889 100644 ---

[libvirt] [PATCH v3 06/11] secret_driver.c: use virConnectValidateURIPath()

2019-09-25 Thread Daniel Henrique Barboza
Suggested-by: Cole Robinson Signed-off-by: Daniel Henrique Barboza --- src/secret/secret_driver.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index 7512a51c74..ed3bd3c751 100644 ---

[libvirt] [PATCH v3 03/11] interface_backend_udev.c: use virConnectValidateURIPath()

2019-09-25 Thread Daniel Henrique Barboza
Suggested-by: Cole Robinson Signed-off-by: Daniel Henrique Barboza --- src/interface/interface_backend_udev.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c index

[libvirt] [PATCH v3 05/11] node_device_driver.c: use virConnectValidateURIPath()

2019-09-25 Thread Daniel Henrique Barboza
Suggested-by: Cole Robinson Signed-off-by: Daniel Henrique Barboza --- src/node_device/node_device_driver.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index

[libvirt] [PATCH v3 00/11] remove repetition of URI path validation

2019-09-25 Thread Daniel Henrique Barboza
This is a code repetition that I crossed a few times, then I noticed that Cole Robinson suggested a solution for it in the wiki. Here it is. changes from v2: - use a boolean to determine 'QEMU' and 'vbox' case to avoid block repetition (patch 8) - avoid 80+ chars lines in all patches changes

Re: [libvirt] [PATCH 1/1] dirty-bitmaps: remove deprecated autoload parameter

2019-09-25 Thread Vladimir Sementsov-Ogievskiy
25.09.2019 16:01, John Snow wrote: > > > On 9/25/19 3:20 AM, Vladimir Sementsov-Ogievskiy wrote: >> 25.09.2019 2:01, John Snow wrote: >>> This parameter has been deprecated since 2.12.0 and is eligible for >>> removal. Remove this parameter as it is actually completely ignored; >>> let's not

Re: [libvirt] [PATCH v3 02/22] build-aux: rewrite augest test generator in Python

2019-09-25 Thread Ján Tomko
On Tue, Sep 24, 2019 at 03:58:43PM +0100, Daniel P. Berrangé wrote: As part of an goal to eliminate Perl from libvirt build tools, rewrite the augeas-gentest.pl tool in Python. This was a straight conversion, manually going line-by-line to change the syntax from Perl to Python. Thus the overall

Re: [libvirt] [PATCH 1/1] dirty-bitmaps: remove deprecated autoload parameter

2019-09-25 Thread John Snow
On 9/25/19 3:20 AM, Vladimir Sementsov-Ogievskiy wrote: > 25.09.2019 2:01, John Snow wrote: >> This parameter has been deprecated since 2.12.0 and is eligible for >> removal. Remove this parameter as it is actually completely ignored; >> let's not give false hope. >> >> Signed-off-by: John Snow

[libvirt] [PATCH v2 1/7] qemu: Move, rename and export qemuDomObjFromDomain

2019-09-25 Thread Peter Krempa
Move it to qemu_domain.c and rename it to qemuDomainObjFromDomain. This will allow reusing it after splitting out checkpoint code from qemu_driver.c. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 31 + src/qemu/qemu_domain.h | 1 + src/qemu/qemu_driver.c | 303

[libvirt] [PATCH v2 6/7] qemu: domain: Move checkpoint related code to qemu_checkpoint.c

2019-09-25 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 185 ++--- src/qemu/qemu_checkpoint.h | 5 + src/qemu/qemu_domain.c | 162 +--- src/qemu/qemu_domain.h | 15 --- 4 files changed, 180 insertions(+), 187

[libvirt] [PATCH v2 4/7] qemu: driver: Remove misplaced qemuDomainObjEndJob in qemuDomainCheckpointGetXMLDesc

2019-09-25 Thread Peter Krempa
The code that gets the job to refresh disk sizes was not merged yet so remove this artifact. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ca25814bd1..7da6dbce66 100644 ---

[libvirt] [PATCH v2 0/7] qemu: checkpoints: Collect most code in a single place

2019-09-25 Thread Peter Krempa
The checkpoint code is quite complex and was dispersed in many places. Refactor it to be in one new separate file. I also plan to do the same to the snapshot code once this is dealt with. Additionally aggregating all the code in one place will allow refactoring and reuse in the incremental

[libvirt] [PATCH v2 5/7] qemu: driver: Move checkpoint-related code to qemu_checkpoint.c

2019-09-25 Thread Peter Krempa
Move all extensive functions to a new file so that we don't just pile everything in the common files. This obviously isn't possible with straight code movement as we still need stubs in qemu_driver.c Additionally some functions e.g. for looking up a checkpoint by name were so short that moving

[libvirt] [PATCH v2 2/7] conf: Drop pointless 'domain' argument from virDomainCheckpointRedefinePrep

2019-09-25 Thread Peter Krempa
'vm' is passed in which contains the definition which contains the UUID so we don't need another parameter for this. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 7 +++ src/conf/checkpoint_conf.h | 3 +-- src/qemu/qemu_driver.c | 2 +- src/test/test_driver.c | 2 +-

[libvirt] [PATCH v2 7/7] qemu: driver: Don't pull in qemu_monitor_json.h directly

2019-09-25 Thread Peter Krempa
There's nothing that uses it directly now. Also not allowing direct use will promote our layering. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7163216f69..5852df2a53 100644 ---

[libvirt] [PATCH v2 3/7] conf: Drop pointless 'domain' argument from virDomainSnapshotRedefinePrep

2019-09-25 Thread Peter Krempa
'vm' is passed in which contains the definition which contains the UUID so we don't need another parameter for this. Signed-off-by: Peter Krempa --- src/conf/snapshot_conf.c | 5 ++--- src/conf/snapshot_conf.h | 3 +-- src/qemu/qemu_driver.c | 2 +- src/test/test_driver.c | 2 +- 4 files

Re: [libvirt] [PATCH 1/1] conf: handle empty string in interface target name

2019-09-25 Thread Peter Krempa
On Wed, Sep 25, 2019 at 12:42:07 +, Nikolay Shirokovskiy wrote: > > > On 23.09.2019 17:44, Peter Krempa wrote: > > On Mon, Sep 23, 2019 at 11:21:33 -0300, Daniel Henrique Barboza wrote: > >> > >> > >> On 9/23/19 8:55 AM, Nikolay Shirokovskiy wrote: > >>> Empty name is not allowed by schema

Re: [libvirt] [PATCH 1/1] conf: handle empty string in interface target name

2019-09-25 Thread Nikolay Shirokovskiy
On 23.09.2019 17:44, Peter Krempa wrote: > On Mon, Sep 23, 2019 at 11:21:33 -0300, Daniel Henrique Barboza wrote: >> >> >> On 9/23/19 8:55 AM, Nikolay Shirokovskiy wrote: >>> Empty name is not allowed by schema but qemu is able to start with such >>> a config (and I guess some other hypervisors

Re: [libvirt] [PATCH v3 01/22] docs: document that C & Python are the preferred languages

2019-09-25 Thread Ján Tomko
On Tue, Sep 24, 2019 at 03:58:42PM +0100, Daniel P. Berrangé wrote: Blacklist Perl and Shell code in favour of Python for sake of readability and portability. Signed-off-by: Daniel P. Berrangé --- docs/hacking.html.in | 30 ++ 1 file changed, 30 insertions(+)

[libvirt] [PATCH] domain_conf: Fix str2enum translation of video driver name

2019-09-25 Thread Michal Privoznik
In bc1e924cf0d we've introduced video driver name and whilst doing so we've utilized VIR_ENUM_IMPL() macro. Then, in domain XML parsing code the generated virDomainVideoBackendTypeFromString() is called and its return value is assigned directly to an unsigned int variable which is wrong. Also, the

Re: [libvirt] [PATCH] qemu_blockjob: Remove secdriver metadata for whole backing chain on job completion

2019-09-25 Thread Peter Krempa
On Mon, Sep 16, 2019 at 16:13:39 +0200, Peter Krempa wrote: > On Mon, Sep 16, 2019 at 12:34:32 +0200, Michal Privoznik wrote: > > Turns out, block mirror is not the only job a disk can have. It > > can also do commits of one layer into the other. Or possibly some > > other tricks too. Problem is

Re: [libvirt] [PATCH] remote: fix systemd IP socket activation with virtproxyd

2019-09-25 Thread Erik Skultety
On Tue, Sep 24, 2019 at 04:07:17PM +0100, Daniel P. Berrangé wrote: > We recently forbid the use of --listen with socket activation: > > commit 3a6a725b8f575890ee6c151ad1f46ea0ceea1f3b > Author: Daniel P. Berrangé > Date: Thu Aug 22 14:52:16 2019 +0100 > > remote: forbid the

Re: [libvirt] [PATCH 1/1] dirty-bitmaps: remove deprecated autoload parameter

2019-09-25 Thread Vladimir Sementsov-Ogievskiy
25.09.2019 2:01, John Snow wrote: > This parameter has been deprecated since 2.12.0 and is eligible for > removal. Remove this parameter as it is actually completely ignored; > let's not give false hope. > > Signed-off-by: John Snow > --- > qemu-deprecated.texi | 20 +++- >

Re: [libvirt] [PATCH] spec: Drop unittest overrides

2019-09-25 Thread Erik Skultety
On Tue, Sep 24, 2019 at 01:50:39PM -0400, Cole Robinson wrote: > nodinfotest.c doesn't exist anymore > > seclabeltest.c has changed substantially since this behavior was > added to the spec, and in my testing doesn't have any problems > running in mock > > Signed-off-by: Cole Robinson > ---