Re: [libvirt] [PATCH v4 00/17] virObject adjustments for common object

2017-08-22 Thread John Ferlan
On 08/22/2017 11:34 AM, Peter Krempa wrote: > On Mon, Aug 21, 2017 at 11:27:17 -0400, John Ferlan wrote: >> On 08/21/2017 09:06 AM, Peter Krempa wrote: >>> On Fri, Aug 18, 2017 at 17:50:24 -0400, John Ferlan wrote: > > [...] > >> Oddly it's OK for virhash code to generically call something a "k

[libvirt] New QEMU daemon for persistent reservations

2017-08-22 Thread Paolo Bonzini
Hi all, I am adding a new daemon to QEMU, that QEMU can connect to in order to issue persistent reservation commands. The daemon can only issue the commands on file descriptor that QEMU already has. In addition normal users shouldn't have access to the daemon's Unix socket in /run, so the daemon

Re: [libvirt] [PATCH 3/3] conf: do not count per-device boot elements when parsing

2017-08-22 Thread Peter Krempa
On Tue, Aug 22, 2017 at 13:50:39 +0200, Ján Tomko wrote: > When parsing bootable devices, we maintain a bitmap of used > elements. Use it in the post-parse function > to figure out whether the user tried to mix per-device and > per-domain boot elements. > > This removes the need to count them twi

Re: [libvirt] [PATCH 04/17] conf: switch from while to for loop for chardev parsing

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:04AM +0200, Pavel Hrdina wrote: This removes one level of indentation. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 168 - 1 file changed, 84 insertions(+), 84 deletions(-) ACK Jan signature.asc Descr

Re: [libvirt] [PATCH 08/17] conf: move chardev protocol parsing to separate function

2017-08-22 Thread Pavel Hrdina
On Tue, Aug 22, 2017 at 03:59:01PM +0200, Ján Tomko wrote: > On Mon, Aug 21, 2017 at 10:07:08AM +0200, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > src/conf/domain_conf.c | 39 ++- > > 1 file changed, 26 insertions(+), 13 deletions(-) > > > >

Re: [libvirt] [PATCH 2/3] conf: create a thin wrapper above virDomainDefPostParse

2017-08-22 Thread Peter Krempa
On Tue, Aug 22, 2017 at 13:50:38 +0200, Ján Tomko wrote: > Rename the original function to virDomainDefPostParseInternal > to allow adding arguments that will be only used by the internal > version. > --- > src/conf/domain_conf.c | 24 ++-- > 1 file changed, 18 insertions(+), 6

Re: [libvirt] [PATCH 1/3] conf: rename virDomain*PostParseInternal to virDomain*PostParseCommon

2017-08-22 Thread Peter Krempa
On Tue, Aug 22, 2017 at 13:50:37 +0200, Ján Tomko wrote: > These functions contain the post-parse steps common for all drivers. > Rename it to use the 'Common' prefix, instead of the vagueness > of 'Internal', leaving 'Internal' available for other vague uses. > --- > src/conf/domain_conf.c | 18 +

Re: [libvirt] [PATCH v4 00/17] virObject adjustments for common object

2017-08-22 Thread Peter Krempa
On Mon, Aug 21, 2017 at 11:27:17 -0400, John Ferlan wrote: > On 08/21/2017 09:06 AM, Peter Krempa wrote: > > On Fri, Aug 18, 2017 at 17:50:24 -0400, John Ferlan wrote: [...] > Oddly it's OK for virhash code to generically call something a "key" and > have a default search mechanism that uses a vo

Re: [libvirt] [PATCH v4 4/4] docs: document migrate-getmaxdowntime support

2017-08-22 Thread John Ferlan
On 08/17/2017 06:17 PM, Scott Garfinkle wrote: > --- > docs/news.xml | 10 ++ > 1 file changed, 10 insertions(+) > Reviewed-by: John Ferlan John I'll push these a bit later - just to be sure you're OK with the adjustments and to ensure someone else doesn't pick up on something I've

Re: [libvirt] [PATCH v4 3/4] virsh: Add support for virDomainMigrateGetMaxDowntime

2017-08-22 Thread John Ferlan
On 08/17/2017 06:17 PM, Scott Garfinkle wrote: > Implement a migrate-getmaxdowntime command to complement > migrate-setmaxdowntime. > --- > tools/virsh-domain.c | 42 ++ > tools/virsh.pod | 6 ++ > 2 files changed, 48 insertions(+) > Please do

Re: [libvirt] [PATCH 17/17] conf: move chardev validation into virDomainDeviceDefValidateInternal

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:17AM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 221 + 1 file changed, 132 insertions(+), 89 deletions(-) ACK Jan signature.asc Description: Digital signature -- libvir-lis

Re: [libvirt] [PATCH v4 2/4] qemu: Implement virDomainMigrateGetMaxDowntime

2017-08-22 Thread John Ferlan
On 08/17/2017 06:17 PM, Scott Garfinkle wrote: > Add code to support querying maximum allowable downtime during live migration. > --- > src/qemu/qemu_driver.c | 58 > > src/qemu/qemu_monitor.h | 3 +++ > src/qemu/qemu_monitor_json.c | 4

Re: [libvirt] [PATCH v4 1/4] Add virDomainMigrateGetMaxDowntime public API

2017-08-22 Thread John Ferlan
On 08/17/2017 06:17 PM, Scott Garfinkle wrote: > Add virDomainMigrateGetMaxDowntime to support querying maximum allowable > downtime during live migration. > --- > include/libvirt/libvirt-domain.h | 4 > src/driver-hypervisor.h | 6 ++ > src/libvirt-domain.c | 41

Re: [libvirt] [libvirt-php PATCH v2 00/11] Refactor into smaller components

2017-08-22 Thread John Ferlan
On 08/22/2017 10:16 AM, Neal Gompa wrote: > On Mon, Aug 21, 2017 at 11:56 PM, Dawid Zamirski wrote: >> On Thu, 2017-08-03 at 14:34 -0400, Dawid Zamirski wrote: >>> As per [1], this patch series splits up the large libvirt-php.c into >>> components that (attempts) to resemble the structure of the

Re: [libvirt] [PATCH 16/17] conf: separate PTY chardev source parsing

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:16AM +0200, Pavel Hrdina wrote: There is no reason why to share the same code for PTY and other file based chardev source types. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) ACK Jan

Re: [libvirt] [PATCH 15/17] conf: move FILE chardev source parsing to separate function

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:15AM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 37 ++--- 1 file changed, 26 insertions(+), 11 deletions(-) ACK Jan signature.asc Description: Digital signature -- libvir-list mailing list

Re: [libvirt] [PATCH 13/17] conf: move UNIX chardev source parsing to separate function

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:13AM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 34 ++ 1 file changed, 22 insertions(+), 12 deletions(-) ACK Jan signature.asc Description: Digital signature -- libvir-list mailing list li

Re: [libvirt] [PATCH 14/17] conf: assign parsed strings directly into chardev source definition

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:14AM +0200, Pavel Hrdina wrote: Since the source element is parsed only once for these type of character devices we don't have to use temporary variable and check whether the variable was already set. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 43

Re: [libvirt] [PATCH 12/17] conf: move UDP chardev source parsing to separate function

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:12AM +0200, Pavel Hrdina wrote: The extra check whether (connect|bind)(Host|Service) was set is required because for UDP chardev there can be two source elements. Without the check there could be a memory leak. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c

Re: [libvirt] [libvirt-php PATCH v2 00/11] Refactor into smaller components

2017-08-22 Thread Neal Gompa
On Mon, Aug 21, 2017 at 11:56 PM, Dawid Zamirski wrote: > On Thu, 2017-08-03 at 14:34 -0400, Dawid Zamirski wrote: >> As per [1], this patch series splits up the large libvirt-php.c into >> components that (attempts) to resemble the structure of the libvirt >> project. Each patch successive patch

Re: [libvirt] [PATCH 11/17] conf: move TCP chardev source parsing to separate function

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:11AM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 121 +++-- 1 file changed, 57 insertions(+), 64 deletions(-) ACK Jan signature.asc Description: Digital signature -- libvir-list

Re: [libvirt] [PATCH 10/17] conf: move mode parsing of chardev source to separate function

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:10AM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 60 +- 1 file changed, 45 insertions(+), 15 deletions(-) ACK Jan signature.asc Description: Digital signature -- libvir-list

Re: [libvirt] [PATCH 09/17] conf: move chardev log parsing to separate function

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:09AM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 40 1 file changed, 24 insertions(+), 16 deletions(-) ACK Jan signature.asc Description: Digital signature -- libvir-list mailing l

Re: [libvirt] [PATCH 08/17] conf: move chardev protocol parsing to separate function

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:08AM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 39 ++- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bb4be5d1cd..8fe7

Re: [libvirt] [PATCH 06/17] conf: error out for multiple log elements while parsing chardev

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:06AM +0200, Pavel Hrdina wrote: Remove check whether a variable was already set because the element is parsed only once now. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) ACK Jan si

Re: [libvirt] [PATCH 07/17] conf: error out for multiple protocol elements while parsing chardev

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:07AM +0200, Pavel Hrdina wrote: Remove check whether a variable was already set because the element is parsed only once now. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) ACK Jan signat

Re: [libvirt] [PATCH 05/17] conf: error out for multiple source elements while parsing chardev

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:05AM +0200, Pavel Hrdina wrote: Currently we accept and correctly parse this chardev XML: ... ... The parsed formatted XML is: ... ... That behavior is super wrong and should not be allowed. If you notice the current parse tak

Re: [libvirt] [PATCH 02/17] tests: introduce genericxml test for UDP chardev

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:02AM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- ...generic-chardev-udp-missing-connect-service.xml | 24 +++ tests/genericxml2xmlindata/generic-chardev-udp.xml | 47 ++ .../genericxml2xmloutdata/generic-chardev-udp.xml | 47

Re: [libvirt] [PATCH 03/17] tests: introduce genericxml test for UNIX chardev

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:03AM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- .../generic-chardev-unix-redirdev-missing-path.xml | 24 .../generic-chardev-unix-rng-missing-path.xml | 25 ...generic-chardev-unix-smartcard-missing-path.xml | 23

Re: [libvirt] [PATCH 01/17] tests: introduce genericxml test for TCP chardev

2017-08-22 Thread Ján Tomko
On Mon, Aug 21, 2017 at 10:07:01AM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- .../generic-chardev-tcp-missing-host.xml | 25 .../generic-chardev-tcp-missing-service.xml| 25 tests/genericxml2xmlindata/generic-chardev-tcp.xml | 32

[libvirt] [PATCH 3/3] conf: do not count per-device boot elements when parsing

2017-08-22 Thread Ján Tomko
When parsing bootable devices, we maintain a bitmap of used elements. Use it in the post-parse function to figure out whether the user tried to mix per-device and per-domain boot elements. This removes the need to count them twice. --- src/conf/domain_conf.c | 48 ++--

[libvirt] [PATCH 2/3] conf: create a thin wrapper above virDomainDefPostParse

2017-08-22 Thread Ján Tomko
Rename the original function to virDomainDefPostParseInternal to allow adding arguments that will be only used by the internal version. --- src/conf/domain_conf.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_

[libvirt] [PATCH 1/3] conf: rename virDomain*PostParseInternal to virDomain*PostParseCommon

2017-08-22 Thread Ján Tomko
These functions contain the post-parse steps common for all drivers. Rename it to use the 'Common' prefix, instead of the vagueness of 'Internal', leaving 'Internal' available for other vague uses. --- src/conf/domain_conf.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-)

[libvirt] [PATCHv2 0/3] conf: do not count per-device boot elements when parsing

2017-08-22 Thread Ján Tomko
Ján Tomko (3): conf: rename virDomain*PostParseInternal to virDomain*PostParseCommon conf: create a thin wrapper above virDomainDefPostParse conf: do not count per-device boot elements when parsing src/conf/domain_conf.c | 82 +++--- 1 file chang

Re: [libvirt] [PATCH] conf: do not count per-device boot elements when parsing

2017-08-22 Thread Peter Krempa
On Tue, Aug 22, 2017 at 09:51:04 +0200, Ján Tomko wrote: > When parsing bootable devices, we maintain a bitmap of used > elements. Use it in the post-parse function > to figure out whether the user tried to mix per-device and > per-domain boot elements. > > This removes the need to count them twi

[libvirt] [PATCH] conf: do not count per-device boot elements when parsing

2017-08-22 Thread Ján Tomko
When parsing bootable devices, we maintain a bitmap of used elements. Use it in the post-parse function to figure out whether the user tried to mix per-device and per-domain boot elements. This removes the need to count them twice. --- src/conf/domain_conf.c| 46 -

Re: [libvirt] [PATCH] conf: useserial: drop useless check for serial devices

2017-08-22 Thread Pavel Hrdina
On Fri, Aug 18, 2017 at 05:19:48PM +0200, Ján Tomko wrote: > Since its introduction in commit 874e65aa, if someone requests: > > we report an error if we cannot successfully count the number > of serial devices via an XPath query. > > Instead of fixing the check (and moving it to the validation p