Re: [libvirt] [PATCH] util: mdev: Treat the 'name' sysfs attribute as optional

2018-03-06 Thread Erik Skultety
On Tue, Mar 06, 2018 at 11:47:51AM -0500, John Ferlan wrote: > > > On 03/05/2018 09:43 AM, Erik Skultety wrote: > > When commit 3545cbef moved the sysfs attribute reading logic from > > _udev.c module to virmdev.c, it had to replace our udev read wrappers > > with the ones available from

Re: [libvirt] [PATCH 5/5] rpc: switch virtlockd and virtlogd to use single-threaded dispatch

2018-03-06 Thread Jim Fehlig
On 03/06/2018 10:58 AM, Daniel P. Berrangé wrote: Currently both virtlogd and virtlockd use a single worker thread for dispatching RPC messages. Even this is overkill and their RPC message handling callbacks all run in short, finite time and so blocking the main loop is not an issue like you'd

Re: [libvirt] [PATCH 4/5] rpc: avoid crashing in pre-exec if no workers are present

2018-03-06 Thread Jim Fehlig
On 03/06/2018 10:58 AM, Daniel P. Berrangé wrote: If max_workers is set to zero, then the worker thread pool won't be created, so when serializing state for pre-exec we must set various parameters to zero. Signed-off-by: Daniel P. Berrangé --- src/rpc/virnetserver.c | 3

Re: [libvirt] [PATCH 3/5] rpc: invoke the message dispatch callback with client unlocked

2018-03-06 Thread Jim Fehlig
On 03/06/2018 10:58 AM, Daniel P. Berrangé wrote: Currently if the virNetServer instance is created with max_workers==0 to request a non-threaded dispatch process, we deadlock during dispatch #0 0x7fb845f6f42d in __lll_lock_wait () from /lib64/libpthread.so.0 #1 0x7fb845f681d3

Re: [libvirt] [PATCH 2/5] rpc: simplify calling convention of virNetServerClientDispatchFunc

2018-03-06 Thread Jim Fehlig
On 03/06/2018 10:58 AM, Daniel P. Berrangé wrote: Currently virNetServerClientDispatchFunc implementations are only responsible for free'ing the "msg" parameter upon success. Simplify the calling convention by making it their unconditional responsibility to free the "msg", and close the client

Re: [libvirt] [PATCH 1/5] rpc: push ref acquisition into RPC dispatch function

2018-03-06 Thread Jim Fehlig
On 03/06/2018 10:58 AM, Daniel P. Berrangé wrote: There's no reason why the virNetServerClientDispatchRead method needs to acquire an extra reference on the "client" object. An extra reference is only needed if the registered dispatch callback is going to keep hold of the "client" for work in

[libvirt] [PATCH] m4: fix pkgcheck detection

2018-03-06 Thread Olaf Hering
AC_PATH_PROG searches either for a binary [pkcheck], or it uses the user provided absolute path in the variable PKCHECK_PATH. Since virt-polkit.m4 wipes the variable PKCHECK_PATH from environment the user decision is never used. Signed-off-by: Olaf Hering --- a/m4/virt-polkit.m4

[libvirt] [perl PATCH 0/3] Make the perl documentation less confusing

2018-03-06 Thread Laine Stump
I encountered several examples that assigned a network, an nwfilter, or just about anything to a variable called $dom, and called connections $vmm. This seemed confusing, so... Laine Stump (3): docs: replace $vmm with $conn docs: replace VMM with hypervisor docs: fix other assorted example

[libvirt] [perl PATCH 2/3] docs: replace VMM with hypervisor

2018-03-06 Thread Laine Stump
I *think* this makes the most sense in the context of the descriptions, but am open to other ideas (I also considered "virtualization host", which might be better; it just seemed a bit long...) Signed-off-by: Laine Stump --- lib/Sys/Virt.pm | 92

[libvirt] [perl PATCH 3/3] docs: fix other assorted example variable names

2018-03-06 Thread Laine Stump
There were quite a few instances of apparent copy/paste from domain examples over to examples of the same action on a different type of object (e.g. calling define_network() and assigning the result to a variable called $dom). This patch removes as many of them as I noticed while doing a search

[libvirt] [perl PATCH 1/3] docs: replace $vmm with $conn

2018-03-06 Thread Laine Stump
This is more in line with the naming in C language examples, and within libvirt's own code. Signed-off-by: Laine Stump --- lib/Sys/Virt.pm | 188 1 file changed, 94 insertions(+), 94 deletions(-) diff --git

Re: [libvirt] [PATCH 0/5] Fix virtlockd loosing locks

2018-03-06 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 05:58:47PM +, Daniel P. Berrangé wrote: > This is a workaround for the bizarre behaviour whereby the kernel throws > away all fcntl() locks on execve()... if any threads are running. We > simply make virtlockd & virlogd single threaded instead. > > Daniel P. Berrangé

Re: [libvirt] [tck PATCH 2/2] Fix no-mac-broadcast test

2018-03-06 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 12:56:47PM -0500, Laine Stump wrote: > This test is supposed to test that the no-mac-broadcast nwfilter > properly blocks all outgoing traffic with the MAC broadcast address as > its destination. When the no-mac-broadcast filter is used by itself, > though, it blocks even

Re: [libvirt] [tck PATCH 1/2] cleanup all nwfilters beginning with ^tck

2018-03-06 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 12:56:46PM -0500, Laine Stump wrote: > Just as we do with domains, network, etc, do a pre-test check for any > existing nwfilters that start with "tck" (the test will be aborted in > that case unless "--force" is added to the commandline), and remove > same during the

[libvirt] [PATCH 4/5] rpc: avoid crashing in pre-exec if no workers are present

2018-03-06 Thread Daniel P . Berrangé
If max_workers is set to zero, then the worker thread pool won't be created, so when serializing state for pre-exec we must set various parameters to zero. Signed-off-by: Daniel P. Berrangé --- src/rpc/virnetserver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[libvirt] [PATCH 2/5] rpc: simplify calling convention of virNetServerClientDispatchFunc

2018-03-06 Thread Daniel P . Berrangé
Currently virNetServerClientDispatchFunc implementations are only responsible for free'ing the "msg" parameter upon success. Simplify the calling convention by making it their unconditional responsibility to free the "msg", and close the client if desired. Signed-off-by: Daniel P. Berrangé

[libvirt] [PATCH 5/5] rpc: switch virtlockd and virtlogd to use single-threaded dispatch

2018-03-06 Thread Daniel P . Berrangé
Currently both virtlogd and virtlockd use a single worker thread for dispatching RPC messages. Even this is overkill and their RPC message handling callbacks all run in short, finite time and so blocking the main loop is not an issue like you'd see in libvirtd with long running QEMU commands. By

[libvirt] [PATCH 1/5] rpc: push ref acquisition into RPC dispatch function

2018-03-06 Thread Daniel P . Berrangé
There's no reason why the virNetServerClientDispatchRead method needs to acquire an extra reference on the "client" object. An extra reference is only needed if the registered dispatch callback is going to keep hold of the "client" for work in the background. Thus we can push reference acquisition

[libvirt] [PATCH 3/5] rpc: invoke the message dispatch callback with client unlocked

2018-03-06 Thread Daniel P . Berrangé
Currently if the virNetServer instance is created with max_workers==0 to request a non-threaded dispatch process, we deadlock during dispatch #0 0x7fb845f6f42d in __lll_lock_wait () from /lib64/libpthread.so.0 #1 0x7fb845f681d3 in pthread_mutex_lock () from /lib64/libpthread.so.0

[libvirt] [PATCH 0/5] Fix virtlockd loosing locks

2018-03-06 Thread Daniel P . Berrangé
This is a workaround for the bizarre behaviour whereby the kernel throws away all fcntl() locks on execve()... if any threads are running. We simply make virtlockd & virlogd single threaded instead. Daniel P. Berrangé (5): rpc: push ref acquisition into RPC dispatch function rpc: simplify

[libvirt] [tck PATCH 2/2] Fix no-mac-broadcast test

2018-03-06 Thread Laine Stump
This test is supposed to test that the no-mac-broadcast nwfilter properly blocks all outgoing traffic with the MAC broadcast address as its destination. When the no-mac-broadcast filter is used by itself, though, it blocks even DHCP and ARP requests, meaning that the network connection to the

[libvirt] [tck PATCH 0/2] Fix no-mac-broadcast test

2018-03-06 Thread Laine Stump
It's surprising that nobody ever noticed in the past that this test was either failing, or wasn't testing what it intended to test. An extra bonus to fixing the test is that we are now testing virNWFilterDefineXML(), and while writing it I discovered that define_nwfilter() has been missing from

[libvirt] [tck PATCH 1/2] cleanup all nwfilters beginning with ^tck

2018-03-06 Thread Laine Stump
Just as we do with domains, network, etc, do a pre-test check for any existing nwfilters that start with "tck" (the test will be aborted in that case unless "--force" is added to the commandline), and remove same during the cleanup at the end. Signed-off-by: Laine Stump ---

Re: [libvirt] [PATCH v2 06/12] qemu: Generate cmd line at startup

2018-03-06 Thread Michal Privoznik
On 03/02/2018 02:22 PM, John Ferlan wrote: > > > On 02/21/2018 01:11 PM, Michal Privoznik wrote: >> This is the easier part. All we need to do here is put -object >> pr-manger-helper,id=$alias,path=$socketPath and then just >> reference the object in -drive file.pr-manger=$alias. > >

Re: [libvirt] [PATCH v2 05/12] qemu: Store pr runtime data in status XML

2018-03-06 Thread Michal Privoznik
On 03/02/2018 01:50 PM, John Ferlan wrote: > > > On 02/21/2018 01:11 PM, Michal Privoznik wrote: >> Now that we generate pr-manager alias and socket path store them >> in status XML so that they are preserved across daemon restarts. >> >> Signed-off-by: Michal Privoznik >>

Re: [libvirt] [PATCH v2 04/12] qemu: Generate alias and socket path for pr-helper

2018-03-06 Thread Michal Privoznik
On 03/02/2018 02:59 AM, John Ferlan wrote: > > > On 02/21/2018 01:11 PM, Michal Privoznik wrote: >> While we're not generating the command line just yet (look for >> the next commits), we can generate the alias for pr-manager. >> A domain can have up to one managed pr-manager (in which case >>

Re: [libvirt] [PATCH v2 02/12] qemuDomainDiskChangeSupported: Deny changing reservations

2018-03-06 Thread Michal Privoznik
On 03/02/2018 02:58 AM, John Ferlan wrote: > > > On 02/21/2018 01:11 PM, Michal Privoznik wrote: >> Couple of reasons for that: >> >> a) there's no monitor command to change path where the pr-helper >> connects to, or >> b) there's no monitor command to introduce a new pr-helper for a >> disk

Re: [libvirt] [PATCH v2 03/12] qemu: Introduce pr-manager-helper capability

2018-03-06 Thread Michal Privoznik
On 03/02/2018 02:58 AM, John Ferlan wrote: > > > On 02/21/2018 01:11 PM, Michal Privoznik wrote: >> The capability tracks if qemu has pr-manager-helper object. At >> this time don't actually detect if qemu has the capability. Not >> just yet. Only after the code is written the feature will be >>

Re: [libvirt] [PATCH v2 10/12] qemu_hotplug: Hotplug of reservations

2018-03-06 Thread Michal Privoznik
On 03/02/2018 06:55 PM, John Ferlan wrote: > > > On 02/21/2018 01:11 PM, Michal Privoznik wrote: >> Surprisingly, nothing special is happening here. If we are the >> first to use the managed helper then spawn it. If not, we're >> almost done. > > But wasn't there a very special reason to start

Re: [libvirt] [PATCH v2 09/12] qemu: Start PR daemons on domain startup

2018-03-06 Thread Michal Privoznik
On 03/02/2018 04:54 PM, John Ferlan wrote: > > > On 02/21/2018 01:11 PM, Michal Privoznik wrote: >> Before we exec() qemu we have to spawn pr-helper processes for >> all managed reservations (well, technically there can only one). > > "can be only one" > > Since there can only be one why do we

Re: [libvirt] [PATCH v2 07/12] qemu: Introduce pr_helper to qemu.conf

2018-03-06 Thread Michal Privoznik
On 03/02/2018 03:12 PM, John Ferlan wrote: > > > On 02/21/2018 01:11 PM, Michal Privoznik wrote: >> Just like we allow users overriding path to bridge-helper >> detected at compile time we can allow them to override path to >> qemu-pr-helper. >> >> Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH] util: mdev: Treat the 'name' sysfs attribute as optional

2018-03-06 Thread John Ferlan
On 03/05/2018 09:43 AM, Erik Skultety wrote: > When commit 3545cbef moved the sysfs attribute reading logic from > _udev.c module to virmdev.c, it had to replace our udev read wrappers > with the ones available from virfile.c. The problem is that the original > logic worked correctly with udev

Re: [libvirt] [PATCH] qemuDomainObjBeginJob: Don't account DESTROY job to maxQueuedJobs

2018-03-06 Thread John Ferlan
On 03/05/2018 04:36 AM, Michal Privoznik wrote: > When trying to destroy a domain (e.g. because we've seen EOF on > the monitor) we try to acquire QEMU_JOB_DESTROY. However, if > max_queued is set in qemu.conf this may fail and since our code > doesn't count on that we will still report domain

Re: [libvirt] [PATCH 1/2] conf: nodedev: Don't refresh host caps in testdriver

2018-03-06 Thread Erik Skultety
On Fri, Mar 02, 2018 at 05:53:22PM -0500, John Ferlan wrote: > > > On 03/02/2018 04:36 PM, Cole Robinson wrote: > > On 03/02/2018 04:02 PM, John Ferlan wrote: > >> > >> > >> On 02/23/2018 06:16 PM, Cole Robinson wrote: > >>> Add a 'testdriver' bool that we set for test_driver.c nodedevs > >>>

Re: [libvirt] [Question]Libvirt doesn't care about qemu monitor event if fail to destroy qemu process

2018-03-06 Thread Wuzongyong (Euler Dept)
Thanks, Zongyong Wu > >> On 03/05/2018 12:43 PM, Cordius Wu wrote: > >> On 03/05/2018 03:20 AM, Wuzongyong (Euler Dept) wrote: > >>> Hi, > >>> > >>> We unregister qemu monitor after sending > >>> QEMU_PROCESS_EVENT_MONITOR_EOF > >> to workerPool: > >>> > >>>

Re: [libvirt] [PATCH 2/7] tests: qemuxml2xml: Remove testing with allowed format detection

2018-03-06 Thread Peter Krempa
On Tue, Mar 06, 2018 at 08:49:35 -0500, John Ferlan wrote: > > > On 03/02/2018 11:56 AM, Peter Krempa wrote: > > Nobody should use format detection due to security implications. > > While I cannot disagree technically - would it be "useful" from a code > coverage viewpoint to have just "one" do

Re: [libvirt] [PATCH 4/4] qemu: Add support for change-vnc-password

2018-03-06 Thread John Ferlan
On 03/06/2018 10:07 AM, Daniel P. Berrangé wrote: > On Tue, Mar 06, 2018 at 09:47:02AM -0500, John Ferlan wrote: >> Rather than use the to be deprecated "change" command, use the >> change-vnc-password command to perform VNC password changes instead >> of the set_password command. Since changing

[libvirt] [PATCH] conf: nodedev: Update capabilities from within virNodeDeviceObjHasCap

2018-03-06 Thread Erik Skultety
Commit d18feadc0c put this into virNodeDeviceMatch, but this should have rather been part of virNodeDeviceObjHasCap from the beginning, since virNodeDeviceObjHasCap is the last helper to be called (in the calltree) whereas virNodeDeviceMatch is called from a single place only -

[libvirt] [PATCH 3/3] qemu: Remove virQEMUCapsProcessProps()

2018-03-06 Thread Andrea Bolognani
This function was introduced in commit 41f5c2ca2776 as a way to probe the same property for multiple devices at once. Although the resulting representation is very compact, it doesn't provide any extra features compared to the existing virQEMUCapsProcessStringFlags() mechanism, which is already

[libvirt] [PATCH 0/3] qemu: Misc capabilities cleanups

2018-03-06 Thread Andrea Bolognani
Please take a deep breath, concentrate and try to visualize a blurb right below this sentence. ... Did it work? Andrea Bolognani (3): qemu: Take full advantage of conditional device property probing qemu: Ignore subsequent attempts to probe device properties qemu: Remove

[libvirt] [PATCH 2/3] qemu: Ignore subsequent attempts to probe device properties

2018-03-06 Thread Andrea Bolognani
In some cases, we are probing multiple devices for the same property and setting the corresponding capability if it's found on any of the devices: when that happens, we can quit early after finding the first property and avoiding a bunch of string comparisons. Signed-off-by: Andrea Bolognani

[libvirt] [PATCH 1/3] qemu: Take full advantage of conditional device property probing

2018-03-06 Thread Andrea Bolognani
Commit 4ae59411fa3f introduced the ability to make probing for device properties conditional on a capability being set, but didn't extend the use of this feature to existing devices. This commit does the last bit of work, which results in a lot of pointless QMP chatter no longer happening and our

Re: [libvirt] [PATCH 4/7] virsh-edit: remove unreachable break

2018-03-06 Thread Laine Stump
On 03/06/2018 09:21 AM, Peter Krempa wrote: > On Tue, Mar 06, 2018 at 15:01:36 +0100, Ján Tomko wrote: >> Introduced by . >> >> Signed-off-by: Ján Tomko >> Signed-off-by: Ján Tomko > You don't need to overdo it. The commit hook looks for just one. He

Re: [libvirt] [PATCH 4/4] qemu: Add support for change-vnc-password

2018-03-06 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 09:47:02AM -0500, John Ferlan wrote: > Rather than use the to be deprecated "change" command, use the > change-vnc-password command to perform VNC password changes instead > of the set_password command. Since changing VNC password only > accepts "keep" for connect and

Re: [libvirt] [PATCH perl 1/2] Add missing define_nwfilter and define_secret APIs

2018-03-06 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 09:43:15AM -0500, Laine Stump wrote: > On 03/06/2018 07:44 AM, Daniel P. Berrangé wrote: > > Signed-off-by: Daniel P. Berrangé > > --- > > Changes | 2 +- > > lib/Sys/Virt.pm | 32 > > 2 files changed, 33

[libvirt] [PATCH 2/4] qemu: Clean up formatting in virQEMUCapsCommands

2018-03-06 Thread John Ferlan
Alter a couple of the definitions to be follow the syntax of previous definitions. Signed-off-by: John Ferlan --- src/qemu/qemu_capabilities.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 3/4] qemu: Add change-vnc-password capability

2018-03-06 Thread John Ferlan
Add the capability for the change-vnc-password command via checking for the presence of the command. Signed-off-by: John Ferlan --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 +

[libvirt] [PATCH 1/4] qemu: Alter current VNC set password to be legacy

2018-03-06 Thread John Ferlan
The QEMU "change" QMP command interface is being deprecated according to qapi-schema.json, so this patch will keep the current API available for legacy/older QEMU binaries with a future patch introducing the newer change-vnc-password QMP command interface. Signed-off-by: John Ferlan

[libvirt] [PATCH 4/4] qemu: Add support for change-vnc-password

2018-03-06 Thread John Ferlan
Rather than use the to be deprecated "change" command, use the change-vnc-password command to perform VNC password changes instead of the set_password command. Since changing VNC password only accepts "keep" for connect and that's the default, no sense in vectoring through "set_password" as we've

[libvirt] [PATCH 0/4] Use and prefer change-vnc-password command

2018-03-06 Thread John Ferlan
While investigating something else - 'change' QMP command for the cdrom/floppy code, I noted the QMP schema lists the change command as being deprecated for use with cdrom/floppy and changing the VNC password. Further digging found that the existing set_password QMP command would make the same

Re: [libvirt] [PATCH perl 1/2] Add missing define_nwfilter and define_secret APIs

2018-03-06 Thread Laine Stump
On 03/06/2018 07:44 AM, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > Changes | 2 +- > lib/Sys/Virt.pm | 32 > 2 files changed, 33 insertions(+), 1 deletion(-) > > diff --git a/Changes b/Changes > index

Re: [libvirt] [PATCH perl 2/2] Fix docs for Sys::Virt::NWFilter undefine method

2018-03-06 Thread Laine Stump
On 03/06/2018 07:44 AM, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé Reviewed-by: Laine Stump > --- > Changes | 1 + > lib/Sys/Virt/NWFilter.pm | 6 ++ > 2 files changed, 3 insertions(+), 4 deletions(-) > > diff --git

[libvirt] [PATCH 5/6] util: storage: Sanitize parsing of disk encryption XMLs

2018-03-06 Thread Peter Krempa
Pass in the XPath context as we do in all other places rather than allocating a new one. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 9 + src/conf/storage_conf.c | 3 +-- src/util/virstorageencryption.c | 37

[libvirt] [PATCH 1/6] util: storage: Simplify error handling in virStorageAuthDefParseXML

2018-03-06 Thread Peter Krempa
Unify the cleanup and error paths and simplify the code flow by removing some unnecessary variables. Signed-off-by: Peter Krempa --- src/util/virstoragefile.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git

[libvirt] [PATCH 6/6] conf: Replace virDomainDiskSourceEncryptionParse by an XPath query

2018-03-06 Thread Peter Krempa
Remove the rather bulky function in favor of an XPath query. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 27 ++- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCH 3/6] conf: Replace virDomainDiskSourceAuthParse by an XPath query

2018-03-06 Thread Peter Krempa
Remove the rather bulky function in favor of an XPath query. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 28 +++- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCH 2/6] util: storage: Sanitize parsing of disk auth XMLs

2018-03-06 Thread Peter Krempa
Pass in the XPath context as we do in all other places rather than allocating a new one. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c| 21 - src/conf/storage_conf.c | 2 +- src/util/virstoragefile.c | 32

[libvirt] [PATCH 0/6] Fix overly complex parsing of storage encryption/authentication

2018-03-06 Thread Peter Krempa
Peter Krempa (6): util: storage: Simplify error handling in virStorageAuthDefParseXML util: storage: Sanitize parsing of disk auth XMLs conf: Replace virDomainDiskSourceAuthParse by an XPath query util: storageencryption: Refactor cleanup section in virStorageEncryptionParseXML util:

[libvirt] [PATCH 4/6] util: storageencryption: Refactor cleanup section in virStorageEncryptionParseXML

2018-03-06 Thread Peter Krempa
The function used the 'cleanup' label only in error cases. This patch makes the code pass the cleanup label in every case and removes few unnecessary VIR_FREEs. Signed-off-by: Peter Krempa --- src/util/virstorageencryption.c | 32 +++- 1 file

Re: [libvirt] [PATCH 7/7] Simplify some conditions

2018-03-06 Thread Peter Krempa
On Tue, Mar 06, 2018 at 15:01:39 +0100, Ján Tomko wrote: > In qemuMigrationSrcRun, we already checked for non-NULL mig > and then dereferenced it. It's only possible for mig to be > NULL in the error section. > > In remoteConnectOpen, conn->uri cannot be NULL in the second > part of the OR

Re: [libvirt] [PATCH 6/7] virsh: use logical or for boolean values

2018-03-06 Thread Peter Krempa
On Tue, Mar 06, 2018 at 15:01:38 +0100, Ján Tomko wrote: > Bitwise or just looks wrong here. > Introduced by . > > Signed-off-by: Ján Tomko > --- But works correctly. ACK signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 5/7] remote: remove unused label

2018-03-06 Thread Peter Krempa
On Tue, Mar 06, 2018 at 15:01:37 +0100, Ján Tomko wrote: > Leftover from . > It seems nobody builds WITH_POLKIT0 and -Wunused-label. > > Signed-off-by: Ján Tomko > --- > src/remote/remote_driver.c | 1 - > 1 file changed, 1 deletion(-) You could also fixing it by removing

Re: [libvirt] [tck PATCH v3 2/2] new NetworkHelper function get_network_ip()

2018-03-06 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 09:17:52AM -0500, Laine Stump wrote: > This function gets the first IP address for the named virtual > network. It is returned as a Net::IP object, so that we will have info > about its netmask/prefix and can easily get it broadcast address and > perform arithmetic on the

Re: [libvirt] [PATCH 3/7] openvz: pass sizeof to snprintf

2018-03-06 Thread Peter Krempa
On Tue, Mar 06, 2018 at 15:01:35 +0100, Ján Tomko wrote: > The size argument accounts for the nul-byte to terminate > the string. Use sizeof and remove the pointless assignment. > > Signed-off-by: Ján Tomko > --- > src/openvz/openvz_driver.c | 3 +-- > 1 file changed, 1

Re: [libvirt] [PATCH 2/7] nwfilter: remove pointless assignment

2018-03-06 Thread Peter Krempa
On Tue, Mar 06, 2018 at 15:01:34 +0100, Ján Tomko wrote: > Changing a parameter passed by value has no effect. > > Introduced by . > > Signed-off-by: Ján Tomko > --- > src/nwfilter/nwfilter_gentech_driver.c | 1 - > 1 file changed, 1 deletion(-) ACK signature.asc

Re: [libvirt] [PATCH 4/7] virsh-edit: remove unreachable break

2018-03-06 Thread Peter Krempa
On Tue, Mar 06, 2018 at 15:01:36 +0100, Ján Tomko wrote: > Introduced by . > > Signed-off-by: Ján Tomko > Signed-off-by: Ján Tomko You don't need to overdo it. The commit hook looks for just one. > --- > tools/virsh-edit.c | 1 - > 1 file changed, 1

Re: [libvirt] [tck PATCH v3 1/2] Remove tab characters from Build.PL

2018-03-06 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 09:17:51AM -0500, Laine Stump wrote: > Signed-off-by: Laine Stump > --- > Build.PL | 104 > +++ > 1 file changed, 52 insertions(+), 52 deletions(-) Reviewed-by: Daniel P. Berrangé

Re: [libvirt] [PATCH 1/7] maint: use parentheses after if

2018-03-06 Thread Peter Krempa
On Tue, Mar 06, 2018 at 15:01:33 +0100, Ján Tomko wrote: > Some instances of ARCH_IS_PPC64 did not use them. > > Introduced by commits da636d8 and ef08a54 > > Signed-off-by: Ján Tomko > --- > src/conf/domain_conf.c | 2 +- > src/qemu/qemu_domain.c | 2 +- > 2 files changed,

[libvirt] [tck PATCH v3 0/2] new NetworkHelper function get_network_ip()

2018-03-06 Thread Laine Stump
New for V3: added in the NetAddr::IP dependency to Build.PL, and added a prequel patch that removes all tabs from that file. Laine Stump (2): Remove tab characters from Build.PL new NetworkHelper function get_network_ip() Build.PL | 105

[libvirt] [tck PATCH v3 1/2] Remove tab characters from Build.PL

2018-03-06 Thread Laine Stump
Signed-off-by: Laine Stump --- Build.PL | 104 +++ 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/Build.PL b/Build.PL index 63785a5..9593021 100644 --- a/Build.PL +++ b/Build.PL @@ -27,11 +27,11 @@ sub

[libvirt] [tck PATCH v3 2/2] new NetworkHelper function get_network_ip()

2018-03-06 Thread Laine Stump
This function gets the first IP address for the named virtual network. It is returned as a Net::IP object, so that we will have info about its netmask/prefix and can easily get it broadcast address and perform arithmetic on the address. Signed-off-by: Laine Stump --- Build.PL

[libvirt] [PATCH 6/7] virsh: use logical or for boolean values

2018-03-06 Thread Ján Tomko
Bitwise or just looks wrong here. Introduced by . Signed-off-by: Ján Tomko --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 29bc8e6db..c78cf7f21 100644 --- a/tools/virsh-domain.c +++

[libvirt] [PATCH 4/7] virsh-edit: remove unreachable break

2018-03-06 Thread Ján Tomko
Introduced by . Signed-off-by: Ján Tomko Signed-off-by: Ján Tomko --- tools/virsh-edit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/virsh-edit.c b/tools/virsh-edit.c index 92a00b7f9..d97794fed 100644 --- a/tools/virsh-edit.c +++

[libvirt] [PATCH 2/7] nwfilter: remove pointless assignment

2018-03-06 Thread Ján Tomko
Changing a parameter passed by value has no effect. Introduced by . Signed-off-by: Ján Tomko --- src/nwfilter/nwfilter_gentech_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c index

[libvirt] [PATCH 5/7] remote: remove unused label

2018-03-06 Thread Ján Tomko
Leftover from . It seems nobody builds WITH_POLKIT0 and -Wunused-label. Signed-off-by: Ján Tomko --- src/remote/remote_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 9ea726dc4..2ec69166f 100644 ---

[libvirt] [PATCH 7/7] Simplify some conditions

2018-03-06 Thread Ján Tomko
In qemuMigrationSrcRun, we already checked for non-NULL mig and then dereferenced it. It's only possible for mig to be NULL in the error section. In remoteConnectOpen, conn->uri cannot be NULL in the second part of the OR expression due to short-circuit evaluation. Signed-off-by: Ján Tomko

[libvirt] [PATCH 1/7] maint: use parentheses after if

2018-03-06 Thread Ján Tomko
Some instances of ARCH_IS_PPC64 did not use them. Introduced by commits da636d8 and ef08a54 Signed-off-by: Ján Tomko --- src/conf/domain_conf.c | 2 +- src/qemu/qemu_domain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c

[libvirt] [PATCH 3/7] openvz: pass sizeof to snprintf

2018-03-06 Thread Ján Tomko
The size argument accounts for the nul-byte to terminate the string. Use sizeof and remove the pointless assignment. Signed-off-by: Ján Tomko --- src/openvz/openvz_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openvz/openvz_driver.c

[libvirt] [PATCH 0/7] Some stylistic cleanups

2018-03-06 Thread Ján Tomko
Ján Tomko (7): maint: use parentheses after if nwfilter: remove pointless assignment openvz: pass sizeof to snprintf virsh-edit: remove unreachable break remote: remove unused label virsh: use logical or for boolean values Simplify some conditions src/conf/domain_conf.c

Re: [libvirt] [PATCH 6/7] tests: qemuxml2xml: Add modern example of status XML to the test

2018-03-06 Thread John Ferlan
On 03/02/2018 11:56 AM, Peter Krempa wrote: > Signed-off-by: Peter Krempa > --- > tests/qemustatusxml2xmldata/modern-in.xml | 443 > + > tests/qemustatusxml2xmldata/modern-out.xml | 443 > + >

Re: [libvirt] [PATCH 0/7] tests: qemu: Do proper status XML testing

2018-03-06 Thread John Ferlan
On 03/02/2018 11:56 AM, Peter Krempa wrote: > The 'fake' status XML testing we were doing until now was terrible and > would not catch most of the problems. Also the code was too complicated. > > This adds a way simpler approach which actually works. (for the small > price of adding a lot of

Re: [libvirt] [PATCH 3/7] tests: qemuxml2xml: Add proper domain status XML testing

2018-03-06 Thread John Ferlan
On 03/02/2018 11:56 AM, Peter Krempa wrote: > Add new approach to properly test status XML files by supplying a full > XML file rather than generating synthetic test cases by prepending the > status header. The two tests introduced here are copies of existing > cases using the synthetic header

Re: [libvirt] [PATCH 2/7] tests: qemuxml2xml: Remove testing with allowed format detection

2018-03-06 Thread John Ferlan
On 03/02/2018 11:56 AM, Peter Krempa wrote: > Nobody should use format detection due to security implications. While I cannot disagree technically - would it be "useful" from a code coverage viewpoint to have just "one" do the allowDiskFormatProbing assignment similar to how various *TLS

[libvirt] [PATCH perl 2/2] Fix docs for Sys::Virt::NWFilter undefine method

2018-03-06 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- Changes | 1 + lib/Sys/Virt/NWFilter.pm | 6 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index d2d9a94..016fcf2 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ Revision

[libvirt] [PATCH perl 1/2] Add missing define_nwfilter and define_secret APIs

2018-03-06 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- Changes | 2 +- lib/Sys/Virt.pm | 32 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index f560864..d2d9a94 100644 --- a/Changes +++ b/Changes @@ -2,7 +2,7 @@

[libvirt] [PATCH perl 0/2] Fix missing methods in Perl binding

2018-03-06 Thread Daniel P . Berrangé
Daniel P. Berrangé (2): Add missing define_nwfilter and define_secret APIs Fix docs for Sys::Virt::NWFilter undefine method Changes | 3 ++- lib/Sys/Virt.pm | 32 lib/Sys/Virt/NWFilter.pm | 6 ++ 3 files changed, 36

Re: [libvirt] [PATCH] tests: force use of "NORMAL" TLS priority in test suite

2018-03-06 Thread Daniel P . Berrangé
On Mon, Mar 05, 2018 at 01:28:24PM +, Daniel P. Berrangé wrote: > When generating certificates we rely on GNUTLS' built-in default setup > for the ciphers used in the certs. We then currently run with the distro > specific TLS priority setup which can be much stronger, to the extent > that the

Re: [libvirt] [tck PATCH v2 2/4] new NetworkHelper function get_network_ip()

2018-03-06 Thread Daniel P . Berrangé
On Mon, Mar 05, 2018 at 03:32:02PM -0500, Laine Stump wrote: > On 03/05/2018 10:15 AM, Daniel P. Berrangé wrote: > > On Mon, Mar 05, 2018 at 10:10:36AM -0500, Laine Stump wrote: > >> On 03/05/2018 04:31 AM, Daniel P. Berrangé wrote: > >>> On Thu, Mar 01, 2018 at 09:49:58PM -0500, Laine Stump

Re: [libvirt] [PATCH] qemu: Fix comparison assignment in qemuDomainUpdateDeviceLive

2018-03-06 Thread Pavel Hrdina
On Tue, Mar 06, 2018 at 09:25:45AM +0100, Erik Skultety wrote: > Fix this common typo and assign a value rather than implicitly > type-casted comparison result. Introduced by commit b6a264e855. > > Signed-off-by: Erik Skultety You could have mention this bugzilla:

Re: [libvirt] [RFC PATCH v3 4/9] qemu: Add capabilities for optional pSeries features

2018-03-06 Thread Andrea Bolognani
On Tue, 2018-03-06 at 11:26 +0530, Shivaprasad bhat wrote: [...] > On the contrary, I see query device-list-proprties on spapr-machine > results in CapsProbeFailure. I tried on both v2.11.1 and v.2.10.2 > > 2018-03-06 05:41:16.201+: 119127: error : qemuMonitorJSONCheckError:392 : > internal

[libvirt] [PATCH] qemu: Fix comparison assignment in qemuDomainUpdateDeviceLive

2018-03-06 Thread Erik Skultety
Fix this common typo and assign a value rather than implicitly type-casted comparison result. Introduced by commit b6a264e855. Signed-off-by: Erik Skultety --- Pushed under the trivial rule. src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)