Re: [libvirt] [PATCH v1 00/26] move qemucaps validations from qemu_command to qemu_domain

2019-12-09 Thread Cole Robinson
offlist. Wow this looks awesome, thanks for tackling it! I'll give the cover letter a response tomorrow when I've had time to digest it On 12/9/19 6:15 PM, Daniel Henrique Barboza wrote: > (series based on master commit 97cafa610ecf5) > > This work was proposed by Cole in [1]. This is Cole's

Re: [libvirt] [PATCH v3 10/30] schemas: Introduce disk type NVMe

2019-12-09 Thread Cole Robinson
r disk of type nvme this element > +specifies the PCI address of the host NVMe > +controller. > +Since 5.6.0 Same > + > > > > -For a "file" or "volume" disk type which represents a cdrom

Re: [libvirt] [PATCH v3 09/30] qemuMigrationSrcIsSafe: Rework slightly

2019-12-09 Thread Cole Robinson
t; --- > src/qemu/qemu_migration.c | 25 - > 1 file changed, 20 insertions(+), 5 deletions(-) Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v3 08/30] virpci: Introduce virPCIDeviceAddressCopy

2019-12-09 Thread Cole Robinson
empa > --- > src/libvirt_private.syms | 1 + > src/util/virpci.c| 14 ++ > src/util/virpci.h| 4 > 3 files changed, 19 insertions(+) Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v3 07/30] virHostdevReAttachPCIDevices: Separate out function body

2019-12-09 Thread Cole Robinson
nged, 37 insertions(+), 21 deletions(-) Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v3 06/30] virHostdevPreparePCIDevices: Separate out function body

2019-12-09 Thread Cole Robinson
rtions(+), 15 deletions(-) Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v3 05/30] virpci: Introduce and use virPCIDeviceAddressGetIOMMUGroupDev

2019-12-09 Thread Cole Robinson
: Michal Privoznik > --- > src/libvirt_private.syms | 1 + > src/qemu/qemu_domain.c | 11 +-- > src/util/virpci.c| 15 +++ > src/util/virpci.h| 1 + > 4 files changed, 18 insertions(+), 10 deletions(-) Reviewed-by: Cole Robinson - Cole --

Re: [libvirt] [PATCH v3 04/30] qemu: Drop some 'cleanup' labels

2019-12-09 Thread Cole Robinson
> 2 files changed, 29 insertions(+), 46 deletions(-) Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v3 03/30] qemuDomainGetHostdevPath: Don't include /dev/vfio/vfio in returned paths

2019-12-09 Thread Cole Robinson
es than just > virDomainHostdev. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_cgroup.c | 52 -- > src/qemu/qemu_domain.c | 98 +- > src/qemu/qemu_domain.h | 9 ++-- > 3 files changed, 42 insertions(+),

Re: [libvirt] [PATCH v3 02/30] qemuDomainGetHostdevPath: Use more g_autoptr()/g_autofree

2019-12-09 Thread Cole Robinson
znik > --- > src/qemu/qemu_domain.c | 18 ++ > 1 file changed, 6 insertions(+), 12 deletions(-) Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v3 01/30] qemu: Explicitly add/remove /dev/vfio/vfio to/from NS/CGroups

2019-12-09 Thread Cole Robinson
evCgroup(virDomainObjPtr vm, > goto cleanup; > } > Maybe just add a comment here explaining that, at VM startup, this can lead to /dev/vfio/vfio being added to the cgroup multiple times, but that has never shown to be a problem. Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v2] lxc: Refresh capabilities if they have never been initalized

2019-12-09 Thread Cole Robinson
Adjust virLXCDriverGetCapabilities to fill in driver->caps if it is empty, regardless of the passed 'refresh' value. This matches the pattern used in virQEMUDriverGetCapabilities This fixes LXC XML startup parsing for me Signed-off-by: Cole Robinson --- v2:

Re: [libvirt] [PATCH 06/30] conf: move virt type / os type / arch validation to post-parse

2019-12-09 Thread Cole Robinson
On 12/4/19 9:20 AM, Daniel P. Berrangé wrote: > The XML parser currently calls virCapabilitiesDomainDataLookup during > parsing to find the domain capabilities matching the triple > > (virt type, os type, arch) > > This is, however, bogus with the QEMU driver as it assumes that there > is an

Re: [libvirt] [PATCH] lxc: Refresh capabilities if they have never been initalized

2019-12-09 Thread Cole Robinson
On 12/9/19 1:15 PM, Cole Robinson wrote: > Adjust virLXCDriverGetCapabilities to fill in driver->caps if it has > never been set, regardless of the passed 'refresh' boolean. > > This fixes LXC XML startup parsing for me > > Signed-off-by: Cole Robinson > --- > src

[libvirt] [PATCH] lxc: Refresh capabilities if they have never been initalized

2019-12-09 Thread Cole Robinson
Adjust virLXCDriverGetCapabilities to fill in driver->caps if it has never been set, regardless of the passed 'refresh' boolean. This fixes LXC XML startup parsing for me Signed-off-by: Cole Robinson --- src/lxc/lxc_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[libvirt] [PATCH] qemu: domain: raise an error when no emulator is found

2019-12-09 Thread Cole Robinson
' Signed-off-by: Cole Robinson --- src/qemu/qemu_domain.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a15364a71e..6f53e17b6a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4687,8 +4687,12

[libvirt] [PATCH 2/2] tests: use PYTHON detected from configure

2019-12-09 Thread Cole Robinson
Extend configure to pass the detect python binary to C code, and use it in the test suite, rather than searching PATH Signed-off-by: Cole Robinson --- configure.ac | 1 + tests/testutils.c | 12 +--- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/configure.ac b

[libvirt] [PATCH 1/2] tests: fix REGENERATE test-wrap-argv.py usage

2019-12-09 Thread Cole Robinson
The path needs to be adjusted for the new script location Signed-off-by: Cole Robinson --- tests/testutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testutils.c b/tests/testutils.c index 9312ff761e..a8215afa42 100644 --- a/tests/testutils.c +++ b/tests

[libvirt] [PATCH 0/2] tests: VIR_TEST_REGENERATE_OUTPUT fixes

2019-12-09 Thread Cole Robinson
the comment suggests, but I didn't investigate it. The patch sidesteps the issue and seems worth doing anyways Cole Robinson (2): tests: fix REGENERATE test-wrap-argv.py usage tests: use PYTHON detected from configure configure.ac | 1 + tests/testutils.c | 14 ++ 2 files changed, 3

[libvirt] [PATCH] Fix src/ pkg-config API XML paths

2019-12-09 Thread Cole Robinson
/to/libvirt.git/run ./setup.py build Signed-off-by: Cole Robinson --- src/libvirt-lxc.pc.in | 2 +- src/libvirt-qemu.pc.in | 2 +- src/libvirt.pc.in | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libvirt-lxc.pc.in b/src/libvirt-lxc.pc.in index 27e3de4244

Re: [libvirt] [PATCH 0/4] drop usage of c-strcase gnulib module

2019-12-08 Thread Cole Robinson
-strcase gnulib module > > bootstrap.conf| 1 - > build-aux/syntax-check.mk | 2 +- > src/internal.h| 11 +-- > tests/virhashtest.c | 2 +- > 4 files changed, 7 insertions(+), 9 deletions(-) > Reviewed-by: Cole Robinson - Cole --

Re: [libvirt] [PATCH v2] qemu: cold-unplug of sound

2019-12-08 Thread Cole Robinson
On 11/29/19 4:40 AM, Jidong Xia wrote: > With this patch users can cold unplug some sound devices. > use "virsh detach-device vm sound.xml --config" command. > > Signed-off-by: Jidong Xia > --- > src/conf/domain_conf.c | 48 > >

Re: [libvirt] [PATCH] security: apparmor: Label externalDataStore

2019-12-08 Thread Cole Robinson
ping On 10/11/19 3:14 PM, Cole Robinson wrote: > Teach virt-aa-helper how to label a qcow2 data_file, tracked internally > as externalDataStore. It should be treated the same as its sibling > disk image > > Signed-off-by: Cole Robinson > --- > Compiled but not runtime

[libvirt] [PATCH] qemu: checkpoint: fix NULL dereference at create time

2019-12-08 Thread Cole Robinson
'cfg' is never initialized here, which causes a crash later in qemuCheckpointCreateFinalize Signed-off-by: Cole Robinson --- src/qemu/qemu_checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index d5af6b99bf

Re: [libvirt] [PATCH v2 20/25] qemu: Implement backup job APIs and qemu handling

2019-12-08 Thread Cole Robinson
On 12/3/19 12:17 PM, Peter Krempa wrote: > This allows to start and manage the backup job. > > Signed-off-by: Peter Krempa > --- > po/POTFILES.in | 1 + > src/qemu/Makefile.inc.am | 2 + > src/qemu/qemu_backup.c | 941 +++ >

Re: [libvirt] [PATCH v2 00/14] drop usage of c-type gnulib module

2019-12-08 Thread Cole Robinson
On 11/20/19 9:48 AM, Pavel Hrdina wrote: > Changes in v2: > - fixed missing parentheses in patch 01 > - added patch 02 to cover c_isascii > With the two issues I pointed out fixed: Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redh

Re: [libvirt] [PATCH v2 04/14] use g_ascii_isalpha instead of c_isalpha from gnulib

2019-12-08 Thread Cole Robinson
On 11/20/19 9:48 AM, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/conf/network_conf.c | 3 +-- > src/qemu/qemu_domain.c | 3 +-- > src/qemu/qemu_qapi.c| 4 +--- > src/util/virconf.c | 2 +- > src/util/virfile.c | 4 ++-- > 5 files changed, 6 insertions(+), 10

Re: [libvirt] [PATCH v2 02/14] virkeyfile: define IS_ASCII instead c_isascii from gnulib

2019-12-08 Thread Cole Robinson
On 11/20/19 9:48 AM, Pavel Hrdina wrote: > GLib doesn't provide alternative to c_isascii and this is the only usage > of that macro so define a replacement ourselves. > > Signed-off-by: Pavel Hrdina > --- > src/util/virkeyfile.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >

[libvirt] [PATCH] spec: mingw: add deps for genprotocol.pl usage

2019-12-03 Thread Cole Robinson
As of 0985a9597bb03 we no longer distribute generated files. mingw needs to call genprotocol.pl itself, which means it needs rpcgen and cpp installed. Signed-off-by: Cole Robinson --- mingw-libvirt.spec.in | 4 1 file changed, 4 insertions(+) diff --git a/mingw-libvirt.spec.in b/mingw

Re: [libvirt] [PATCH 1/4] replace use of gnulib setenv by g_setenv

2019-11-26 Thread Cole Robinson
n", 1) != 0) > vah_error(ctl, 1, _("could not set IFS")); > g_setenv returns gboolean, FALSE on failure. So these need to be adjusted to == FALSE, or !g_setenv. virt-aa-helper test is failing after this There's a few other instances of '< 0' checks which need to be adjusted too. With those fixed, for the series: Reviewed-by: Cole Robinson But probably for after freeze - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 10/10] qemu: blockjob: Finish handling job with broken data

2019-11-26 Thread Cole Robinson
RN("terminating job '%s' with invalid data", job->name); > -goto cleanup; > -} > - > if ((job->newstate == QEMU_BLOCKJOB_STATE_COMPLETED || > job->newstate == QEMU_BLOCKJOB_STATE_FAILED) && > job->state == QEMU_BL

Re: [libvirt] [PATCH 09/10] qemu: blockjob: Introduce "broken" block job type

2019-11-26 Thread Cole Robinson
+- > src/qemu/qemu_blockjob.h | 3 +++ > src/qemu/qemu_domain.c| 13 +- > src/qemu/qemu_driver.c| 1 + > .../blockjob-blockdev-in.xml | 1 + > 5 files changed, 41 insertions(+), 2 d

Re: [libvirt] [PATCH 08/10] qemu: blockjob: Separate clearing of per-job data

2019-11-26 Thread Cole Robinson
ic virClassPtr qemuBlockJobDataClass; > Need an extra newline here to preserve previous spacing Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 07/10] qemu: blockjob: Don't stop processing the finished job early

2019-11-26 Thread Cole Robinson
pdate the state to 'QEMU_BLOCKJOB_STATE_COMPLETED' which is probably > the safest thing to do here. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_blockjob.c | 21 ++--- > 1 file changed, 6 insertions(+), 15 deletions(-) Reviewed-by: Cole Robinson - Cole -- libvir-list mailing

Re: [libvirt] [PATCH 06/10] qemu: blockjob: Mark job with broken data but tracked by qemu as reconnected

2019-11-26 Thread Cole Robinson
rc < 0) > qemuBlockJobUnregister(job, vm); > +else > +job->reconnected = true; > continue; > } > Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 05/10] qemu: blockjob: Log blockjobs which are dropped when untracked by qemu

2019-11-26 Thread Cole Robinson
rtions(+), 1 deletion(-) > Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 04/10] qemu: blockjob: Fix deadlock when terminating job with invalid data

2019-11-26 Thread Cole Robinson
EV. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_blockjob.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 03/10] qemu: process: Move block job refresh after async job recovery

2019-11-26 Thread Cole Robinson
d, 3 insertions(+), 3 deletions(-) > Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 02/10] qemu: blockjob: Properly propagate cancellation of blockjobs

2019-11-26 Thread Cole Robinson
((job->newstate == QEMU_BLOCKJOB_STATE_COMPLETED || > + job->newstate == QEMU_BLOCKJOB_STATE_FAILED) && > job->state == QEMU_BLOCKJOB_STATE_ABORTING) > job->newstate = QEMU_BLOCKJOB_STATE_CANCELLED; > Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 01/10] qemu: monitor: Finish implementation of infrastructure for 'query-jobs'

2019-11-26 Thread Cole Robinson
| 6 ++ > 2 files changed, 8 insertions(+), 2 deletions(-) > Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 8/9] qemu: capabilities: Lock out incremental backup capability without blockdev

2019-11-26 Thread Cole Robinson
a > --- > src/qemu/qemu_capabilities.c | 17 + > src/qemu/qemu_capabilities.h | 2 ++ > 2 files changed, 19 insertions(+) > Reviewed-by: Cole Robinson this made me go look at the case that _BLOCKDEV is disabled. bus='sd', hmm that's unfortunate. Do you know

Re: [libvirt] [PATCH 9/9] qemu: process: Re-process qemu capability lockout in qemuProcessPrepareQEMUCaps

2019-11-26 Thread Cole Robinson
On 11/25/19 7:53 AM, Peter Krempa wrote: > We clear some capabilities here so the lockouts need to be > re-evaluated. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_process.c | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Cole Robinson - Cole --

Re: [libvirt] [PATCH 7/9] qemu: caps: Don't check capability before clearing it

2019-11-26 Thread Cole Robinson
tions(-) > Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 6/9] qemu: process: Move handling of qemu capability overrides

2019-11-26 Thread Cole Robinson
On 11/25/19 7:53 AM, Peter Krempa wrote: > Do all post-processing of capabilities in qemuProcessPrepareQEMUCaps. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_process.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > Reviewed-by: Cole Robinso

Re: [libvirt] [PATCH 5/9] qemu: process: Move clearing of QEMU_CAPS_CHARDEV_FD_PASS to qemuProcessPrepareQEMUCaps

2019-11-26 Thread Cole Robinson
s. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_process.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 4/9] qemu: process: Move clearing of the BLOCKDEV capability to qemuProcessPrepareQEMUCaps

2019-11-26 Thread Cole Robinson
On 11/25/19 7:53 AM, Peter Krempa wrote: > Start aggregating all capability post-processing code in one place. > > The comment was modified while moving it as it was mentioning floppies > which are no longer clearing the blockdev capability. > > Signed-off-by: Peter Krempa > --- >

Re: [libvirt] [PATCH v3 0/4] qemu: fix type of default video device

2019-11-25 Thread Cole Robinson
On 11/25/19 9:40 AM, Pavel Mores wrote: > On Mon, Nov 25, 2019 at 08:54:43AM -0500, Cole Robinson wrote: >> On 11/25/19 5:54 AM, Pavel Mores wrote: >>> This new version mostly integrates Cole's comments about the second version. >>> Refactoring and behaviour change are n

Re: [libvirt] [PATCH v3 0/4] qemu: fix type of default video device

2019-11-25 Thread Cole Robinson
o type selection algorithm Reviewed-by: Cole Robinson and pushed now. patch #3 still had some style issues I pointed out in the previous review: using 'else' when it isn't necessary, because every block returns. Better to use the style of qemuDomainDefaultNetModel which saves having to do any n

Re: [libvirt] [ruby PATCH] Fix default values for node_cpu_stats() and node_memory_stats()

2019-11-22 Thread Cole Robinson
On 11/14/19 4:57 PM, Cole Robinson wrote: > On 10/22/19 11:47 AM, Stefano Garzarella wrote: >> ruby_libvirt_value_to_int() returns 0 if the optional value is >> not defined, but in node_cpu_stats() and node_memory_stats() >> the default value of cpuNum and cellNum is -1. &

Re: [libvirt] [PATCH] domcaps: Remove function initializing domain caps as unsupported

2019-11-21 Thread Cole Robinson
aight revert as additonal patches modified how we store > the capabilities. > > Signed-off-by: Peter Krempa > --- > CCing all people in the original conversation: > CC: Cole Robinson > CC: Ján Tomko > CC: Michal Prívozník > > src/bhyve/bhyve_

Re: [libvirt] [PATCH 5/8] domcaps: Add function for initializing domain caps as unsupported

2019-11-20 Thread Cole Robinson
On 11/20/19 9:40 AM, Peter Krempa wrote: > On Mon, Nov 18, 2019 at 14:43:08 -0500, Cole Robinson wrote: >> On 11/13/19 11:05 AM, Peter Krempa wrote: >>> For future extensions of the domain caps it's useful to have a single >>> point that initializes all capabilities

Re: [libvirt] [PATCH v2 3/3] virt-aa-helper: drop pointer checks in get_files

2019-11-20 Thread Cole Robinson
On 11/20/19 12:25 PM, Jamie Strandboge wrote: > On Wed, 20 Nov 2019, Cole Robinson wrote: > >> On 11/19/19 4:31 PM, Jamie Strandboge wrote: >>> On Thu, 14 Nov 2019, Christian Ehrhardt wrote: >>> >>>> It was mentioned that the pointers in loops like: &g

Re: [libvirt] [PATCH v2 3/3] virt-aa-helper: drop pointer checks in get_files

2019-11-20 Thread Cole Robinson
On 11/19/19 4:31 PM, Jamie Strandboge wrote: > On Thu, 14 Nov 2019, Christian Ehrhardt wrote: > >> It was mentioned that the pointers in loops like: >> for (i = 0; i < ctl->def->nserials; i++) >> if (ctl->def->serials[i] ... >> will always be !NULL or we would have a much more serious

Re: [libvirt] virsh blockresize syntax is inconsistent with vol-resize and somewhat dangerous

2019-11-18 Thread Cole Robinson
On 10/25/19 4:28 AM, Patrik Martinsson wrote: > Hi Tim, > > I recently stumbled on the same thing, accidentally shrinking a blockdevice. > > I have written a patch for virsh that will force the user to append a > '--force' flag if shrinking is desired. > > The behavior is somewhat still

Re: [libvirt] [PATCH 1/8] conf: domcaps: Add 'backingStoreInput' domain capability

2019-11-18 Thread Cole Robinson
On 11/18/19 12:02 PM, Peter Krempa wrote: > Historically we've only supported the as an output-only > element for domain disks. The documentation states that it may become > supported on input. To allow management apps detectin once that happens > add a domain capability which will be asserted if

Re: [libvirt] [PATCH 5/8] domcaps: Add function for initializing domain caps as unsupported

2019-11-18 Thread Cole Robinson
On 11/13/19 11:05 AM, Peter Krempa wrote: > For future extensions of the domain caps it's useful to have a single > point that initializes all capabilities as unsupported by a driver. The > driver then can enable specific ones. > > Signed-off-by: Peter Krempa > --- >

Re: [libvirt] [PATCH v5 00/23] scripts: convert most perl scripts to python

2019-11-18 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > This series is an effort to reduce the number of different > languages we use by eliminating most use of perl in favour > of python. > I tested all the new scripts, see individual mails. I didn't really 'review' any of them; since many are just

Re: [libvirt] [PATCH v5 23/23] docs: move hyperv_wmi_generator.py to the scripts/ directory

2019-11-18 Thread Cole Robinson
changed, 3 insertions(+), 3 deletions(-) > rename {src/hyperv => scripts}/hyperv_wmi_generator.py (100%) For 20-23: Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 19/23] docs: rewrite polkit docs generator in Python

2019-11-18 Thread Cole Robinson
> scripts/genaclperms.py | 123 > 4 files changed, 127 insertions(+), 128 deletions(-) > delete mode 100755 docs/genaclperms.pl > create mode 100755 scripts/genaclperms.py The new script fixes indentation, but otherwise seems to generate identical aclperms.htmlinc Tested-by: Col

Re: [libvirt] [PATCH v5 18/23] docs: rewrite hvsupport.html page generator in python

2019-11-18 Thread Cole Robinson
o the perl script (modulo expected timestamp change) Tested-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 17/23] tests: rewrite file access checker in Python

2019-11-18 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the check-file-access.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 structure

Re: [libvirt] [PATCH v5 16/23] tests: rewrite qemu capability grouper in Python

2019-11-18 Thread Cole Robinson
wrapping in $file", > + file=sys.stderr) > +print("Use test-wrap-argv.py to wrap test data files", > + file=sys.stderr) test-wrap-arg reference here > +return False > +else: > +with open(filename, "w") as fh: > +for line in fixed: > +print(line, file=fh, end='') > + > +return True > + > + > +parser = argparse.ArgumentParser(description='Test arg line wrapper') test-wrap-arg reference here, should be group-qemu-caps Otherwise it seems to work as expected Tested-by: Cole Robinson -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 15/23] tests: rewrite test argv line wrapper in Python

2019-11-18 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the test-wrap-argv.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 structure >

Re: [libvirt] [PATCH v5 14/23] src: rewrite remote protocol checker in Python

2019-11-18 Thread Cole Robinson
src/Makefile.am | 98 -- > 4 files changed, 155 insertions(+), 83 deletions(-) > create mode 100644 scripts/check-remote-protocol.py I verified the script detected a difference in src/qemu_protocol-structs Tested-by: Cole Robinson - Cole -- libvir-list mailing list

Re: [libvirt] [PATCH v5 13/23] src: rewrite polkit ACL generator in Python

2019-11-18 Thread Cole Robinson
> src/access/genpolkit.pl| 119 > 4 files changed, 126 insertions(+), 122 deletions(-) > create mode 100755 scripts/genpolkit.py > delete mode 100755 src/access/genpolkit.pl > Generates identical org.libvirt.api.policy for me Tested-by: Cole Robinson - Cole -- li

Re: [libvirt] [PATCH v5 12/23] src: rewrite ACL rule checker in Python

2019-11-18 Thread Cole Robinson
ower()): > +print("%s:%d Mismatch check 'vir%sEnsureACL'" + > + "for function '%s'" % > + (filename, lineno, func, maybefunc), > + file=sys.stderr) > +errs = True > +acls[maybefunc] = True > +elif checkacl: > +# Record the fact that maybefunc contains an > +# ACL filter call, and make sure it is the right call! > +func = checkacl.group(1) > +if func.startswith("vir"): > +func = func[3:] > + > +if maybefunc is None: > +print("%s:%d Unexpected check '%s' outside function" > % > + (filename, lineno, func), file=sys.stderr) > +errs = True > +else: > +if not maybefunc.lower().endswith(func.lower()): > +print("%s:%d Mismatch check 'vir%sEnsureACL' " + The string here should be vir%sCheckACL After that, and the flake8 fixes, I could trigger the two 'mismatch check' and 'Missing ACL' errors in qemu_driver.c, which are the important ones Tested-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 11/23] src: rewrite driver impl checker in Python

2019-11-18 Thread Cole Robinson
the intent is to match lines like: .connectSupportsFeature = qemuConnectSupportsFeature, /* 0.5.0 */ Then there needs to be something between '?' and '/'. But this script could still be useful for sanitizing virStateDriver structs too, which don't have those ending comments, so maybe just drop the / entirely. With that and the pep8 issues fixed, all the errors trigger as expected Tested-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2] news: mention 'ramfb' mdev attribute

2019-11-17 Thread Cole Robinson
On 11/15/19 10:58 AM, Jonathon Jongsma wrote: > Signed-off-by: Jonathon Jongsma > --- > v2: > Made changes suggested by Andrea. I'll need somebody to push this for me ;) I pushed it with Andrea's RB tag Thanks, Cole -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v5 10/23] src: rewrite driver name checker in Python

2019-11-15 Thread Cole Robinson
"vir") > + > +if sym not in symbols: > +print("Driver method name %s doesn't match public API" % > + drv) Missing status = 1 here > +continue > + > +m = re.search(r

Re: [libvirt] [PATCH v5 09/23] src: rewrite systemtap function generator in Python

2019-11-15 Thread Cole Robinson
erall structure > of the file and approach is the same. > > Signed-off-by: Daniel P. Berrangé libvirt_functions.stp looks the same before and after Tested-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 08/23] src: rewrite systemtap probe generator in Python

2019-11-15 Thread Cole Robinson
erall structure > of the file and approach is the same. > > Signed-off-by: Daniel P. Berrangé I verified *.stp generated output is the same across old and new versions Tested-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 07/23] src: rewrite symfile library checker in Python

2019-11-15 Thread Cole Robinson
erall structure > of the file and approach is the same. I verified this catches a bogus symbol name in libvirt_private.syms Tested-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 06/23] src: rewrite symfile sorting checker in Python

2019-11-15 Thread Cole Robinson
Makefile.inc.am | 2 +- > src/check-symsorting.pl | 106 > 5 files changed, 121 insertions(+), 109 deletions(-) > create mode 100755 scripts/check-symsorting.py > delete mode 100755 src/check-symsorting.pl I verified this catches out of order libv

Re: [libvirt] [PATCH v5 05/23] src: rewrite ACL permissions checker in Python

2019-11-15 Thread Cole Robinson
ot sure if the second one at the end of the file is even triggerable due to compile time protections, but it's still safe to have Tested-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 04/23] build-aux: rewrite header ifdef checker in Python

2019-11-15 Thread Cole Robinson
- > scripts/header-ifdef.py | 231 ++ > 4 files changed, 234 insertions(+), 185 deletions(-) > delete mode 100644 build-aux/header-ifdef.pl > create mode 100644 scripts/header-ifdef.py I verified it catches all 3 errors described in the top comment Tested-by: Cole Robinson - Cole --

Re: [libvirt] [PATCH v5 03/23] build-aux: rewrite mock inline checker in Python

2019-11-15 Thread Cole Robinson
erall structure > of the file and approach is the same. > > Signed-off-by: Daniel P. Berrangé Verified it catches a single failure case Tested-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 02/23] build-aux: rewrite whitespace checker in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the check-spacing.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 structure >

Re: [libvirt] [PATCH v5 00/23] scripts: convert most perl scripts to python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > This series is an effort to reduce the number of different > languages we use by eliminating most use of perl in favour > of python. I'm testing the series now. On fedora 31, make syntax-check is showing some flake8 errors, see attached. I also

Re: [libvirt] [PATCH v5 10/23] src: rewrite driver name checker in Python

2019-11-15 Thread Cole Robinson
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote: > As part of an goal to eliminate Perl from libvirt build tools, > rewrite the check-drivername.pl tool in Python. > > This was mostly a straight conversion, manually going line-by-line > to change the syntax from Perl to Python. Thus the overall

Re: [libvirt] [PATCH v3 0/4] Fix up some issues from x and y resolution patches

2019-11-15 Thread Cole Robinson
> 1 file changed, 40 insertions(+), 35 deletions(-) > Reviewed-by: Cole Robinson And pushed - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [patch 1/1] virt-aa-helper: Add support for smartcard host-certificates

2019-11-14 Thread Cole Robinson
) { Add a space after 'switch'. 'make syntax-check' will catch this. libvirt style is typically to not indent the 'case' keyword either, but this file is inconsistent on that front. With those fixed: Reviewed-by: Cole Robinson This matches what is done for the selinux driv

Re: [libvirt] [PATCH 6/7] conf: add hypervisor agnostic, domain start-time, validation function for NetDef

2019-11-14 Thread Cole Robinson
alNetDefValidate. I think that naming is more consistent rather than invent a new 'runtime' naming scheme, event though runtime is more semanticly descriptive. (though TBH I wouldn't mind s/actual/runtime/ in the codebase anyways, the 'actual' naming always confuses me) Comment should be fixed ei

Re: [libvirt] [ruby PATCH] Fix default values for node_cpu_stats() and node_memory_stats()

2019-11-14 Thread Cole Robinson
but what you describe makes sense and matches my reading of the code. -1 is VIR_NODE_CPU_STATS_ALL_CPUS and VIR_NODE_MEMORY_STATS_ALL_CELLS so it makes sense that would be the default. Reviewed-by: Cole Robinson CCing clalance who is the primary ruby-libvirt maintainer, but if he doesn't get to it

Re: [libvirt] [PATCH] lxc: Fix 'domblkstat' error with attached disk devices.

2019-11-14 Thread Cole Robinson
On 10/20/19 11:54 PM, jcfara...@gmail.com wrote: > From: Julio Faracco > I think if you set your gitconfig correctly, you can avoid this 'From:' showing up. I have: [sendemail] from = "Cole Robinson " [user] name = Cole Robinson email = crobi...@redhat.com >

Re: [libvirt] [PATCH v3 0/9] Enable ramfb parameter for mediated devices

2019-11-14 Thread Cole Robinson
On 11/14/19 11:40 AM, Cole Robinson wrote: > On 10/18/19 11:30 AM, Jonathon Jongsma wrote: >> This is the third version of a patch series that adds support for a boot >> display for mediated vgpu devices using the 'ramfb' parameter. This version >> fixes a bunch of tes

Re: [libvirt] [PATCH v3 0/9] Enable ramfb parameter for mediated devices

2019-11-14 Thread Cole Robinson
On 10/18/19 11:30 AM, Jonathon Jongsma wrote: > This is the third version of a patch series that adds support for a boot > display for mediated vgpu devices using the 'ramfb' parameter. This version > fixes a bunch of test failures that I had inadvertently introduced in the last > series. It also

Re: [libvirt] [PATCH v2 0/2] a few cleanups in qemu_hotplug.c

2019-11-14 Thread Cole Robinson
1 file changed, 29 insertions(+), 43 deletions(-) > I tweaked the patch subjects, to use 'qemu: hotplug:' prefix, the X.c format isn't typically used. Patch 2 incorrectly mentioned qemu_process, so I fixed that too Reviewed-by: Cole Robinson and pushed - Cole -- libvir-list mailing list li

Re: [libvirt] [PATCH v2 3/3] virt-aa-helper: drop pointer checks in get_files

2019-11-14 Thread Cole Robinson
mplify the if chains in get_files by dropping these checks. > > Signed-off-by: Christian Ehrhardt > --- > src/security/virt-aa-helper.c | 135 -- > 1 file changed, 63 insertions(+), 72 deletions(-) > Reviewed-by: Cole Robinson - Cole -- li

Re: [libvirt] [PATCH 2/2] qemu: cold-unplug of sound

2019-11-14 Thread Cole Robinson
On 10/15/19 2:41 AM, Jidong Xia wrote: > With this patch users can cold unplug some sound devices. > use "virsh detach-device vm sound.xml --config" command. > I reviewed and pushed patch #1 Some comments below > Signed-off-by: Jidong Xia > --- > src/conf/domain_conf.c | 61 >

Re: [libvirt] [PATCH] libxl: Fix lock manager lock ordering

2019-11-14 Thread Cole Robinson
libxl_migration.c | 14 +- > 2 files changed, 12 insertions(+), 16 deletions(-) Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 0/3] use virStringParseYesNo helper

2019-11-14 Thread Cole Robinson
| 35 > src/conf/network_conf.c | 4 +--- > src/qemu/qemu_migration_params.c | 7 +-- > 3 files changed, 15 insertions(+), 31 deletions(-) > Reviewed-by: Cole Robinson And pushed Thanks, Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 4/5] conf: report errors when parsing video resolution

2019-11-14 Thread Cole Robinson
On 11/13/19 5:41 PM, Jonathon Jongsma wrote: > On Wed, 2019-11-13 at 13:54 -0500, Cole Robinson wrote: >> I pushed the first three patches. Comments below >> >> On 10/23/19 1:46 PM, Jonathon Jongsma wrote: >>> The current code doesn't properly handle errors when pa

Re: [libvirt] [PATCH] virhostuptime: Add linux stub for musl

2019-11-13 Thread Cole Robinson
buf); > +return -EINVAL; > +} > + > +*tmp = '\0'; > + > +if (virStrToDouble(buf, NULL, ) < 0) { > +virReportError(VIR_ERR_INTERNAL_ERROR, > + _("Unable to parse sched info value '%s'"), > + buf); > +return -EINVAL; > +} > + error message here is a copy+paste mistake. syntax-check says you need to extend POTFILES.in too. With those fixed: Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 0/4] apparmor fixes triggered by multi disk snapshots

2019-11-13 Thread Cole Robinson
insertions(+), 47 deletions(-) > Not runtime tested, but: Reviewed-by: Cole Robinson - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 1/2] virt-aa-helper: add rules for shmem devices

2019-11-13 Thread Cole Robinson
ev/shm/%s", shmem->name) < > 0) > + goto cleanup; virAsprintf is gone in git, you can use g_strdup_printf, which also means dropping the error checking. See the other conversions patches With those changes, for the series: Reviewed-by: Cole Robi

Re: [libvirt] [RFC] default video device type

2019-11-13 Thread Cole Robinson
On 11/13/19 8:22 AM, Martin Kletzander wrote: > On Mon, Oct 07, 2019 at 02:56:11PM +0200, Pavel Mores wrote: >> >> Hi, >> >> I'm looking into fixing >> >> https://bugzilla.redhat.com/show_bug.cgi?id=1668141 >> >> (as a short summary, if a graphics device is added to XML that has no >> video >>

Re: [libvirt] [PATCH v2 1/2] qemu: fix type of default video device

2019-11-13 Thread Cole Robinson
Sorry for the review delay. If you cc me on v3 I'll review it ASAP This patch is mixing two things: refactoring, and behavior change. This makes review more difficult. Please put the refactoring first which will maintain the old behavior, then add functional changes as additional patch(es). On

Re: [libvirt] [PATCH v3 0/3] unplug timeout changes for PPC64

2019-11-13 Thread Cole Robinson
On 10/18/19 2:36 PM, Daniel Henrique Barboza wrote: > changes in v3: > - redesigned patch 1 based on Cole Robinson feedback > > v2: https://www.redhat.com/archives/libvir-list/2019-September/msg00447.html > v1: https://www.redhat.com/archives/libvir-list/2019-August/msg00698.html

Re: [libvirt] [PATCH v2 5/5] conf: report errors when parsing video acceleration

2019-11-13 Thread Cole Robinson
On 10/23/19 1:46 PM, Jonathon Jongsma wrote: > In order to differentiate between a configuration that does not specify > any video acceleration and one that is incorrectly specified, change the > signature of virDomainVideoAccelDefParseXML() to return an error > response. > > If any of the values

Re: [libvirt] [PATCH v2 4/5] conf: report errors when parsing video resolution

2019-11-13 Thread Cole Robinson
I pushed the first three patches. Comments below On 10/23/19 1:46 PM, Jonathon Jongsma wrote: > The current code doesn't properly handle errors when parsing a video > device's resolution. > > This patch changes the parse function signature to return an error > when we're missing an 'x' or 'y'

<    1   2   3   4   5   6   7   8   9   10   >