[libvirt] [PATCHv3] lib: Introduce API for retrieving bulk domain stats

2014-08-26 Thread Peter Krempa
The motivation for this API is that management layers that use libvirt usually poll for statistics using various split up APIs we currently provide. To get all the necessary stuff, the app needs to issue a lot of calls and aggregate the results. The APIs I'm introducing here: 1) Returns data in a

Re: [libvirt] [PATCHv2 3/5] qemu: Implement bulk stats API and one of the stats groups to return

2014-08-26 Thread Eric Blake
On 08/26/2014 01:06 PM, Peter Krempa wrote: On 08/26/14 21:02, Eric Blake wrote: On 08/26/2014 08:14 AM, Peter Krempa wrote: Implement the API function for virDomainListGetStats and virConnectGetAllDomainStats in a modular way and implement the VIR_DOMAIN_STATS_STATE group of statistics. ---

Re: [libvirt] [PATCHv3] lib: Introduce API for retrieving bulk domain stats

2014-08-26 Thread Eric Blake
On 08/26/2014 01:11 PM, Peter Krempa wrote: The motivation for this API is that management layers that use libvirt usually poll for statistics using various split up APIs we currently provide. To get all the necessary stuff, the app needs to issue a lot of calls and aggregate the results.

Re: [libvirt] [PATCHv2 5/5] virsh: Implement command to excercise the bulk stats APIs

2014-08-26 Thread Eric Blake
On 08/26/2014 08:14 AM, Peter Krempa wrote: Add domstats command that excercises both of the new APIs depending if you specify a domain list or not. The output is printed as a key=value list of the returned parameters. Man page section will be added in a separate patch. Trying to stretch

Re: [libvirt] [PATCHv2 00/16] LXC network configuration support

2014-08-26 Thread Richard Weinberger
On Tue, Aug 26, 2014 at 3:20 PM, Cédric Bosdonnat cbosdon...@suse.com wrote: Hi all, Here is the whole series resent with a major addition: the functions used to set the IP and add a route now use libnl when possible. The idea behind this is to avoid requiring iproute2 or ifconfig installed

Re: [libvirt] [PATCHv2 4/5] virsh: domain: Split out code to lookup domain from string

2014-08-26 Thread Eric Blake
On 08/26/2014 08:14 AM, Peter Krempa wrote: Split out guts of the function to reuse it to get domain objects from string. --- tools/virsh-domain.c | 80 +--- tools/virsh-domain.h | 4 +++ 2 files changed, 55 insertions(+), 29 deletions(-)

Re: [libvirt] [PATCH v2 3/8] blockcopy: expose new API in virsh

2014-08-26 Thread Eric Blake
On 08/26/2014 09:12 AM, Peter Krempa wrote: On 08/26/14 13:21, Eric Blake wrote: Expose the new power of virDomainBlockCopy through virsh. Continue to use the older API where possible, for maximum compatibility. @@ -1901,18 +1935,82 @@ cmdBlockCopy(vshControl *ctl, const vshCmd *cmd)

Re: [libvirt] [PATCHv3] lib: Introduce API for retrieving bulk domain stats

2014-08-26 Thread Peter Krempa
On 08/26/14 21:41, Eric Blake wrote: On 08/26/2014 01:11 PM, Peter Krempa wrote: The motivation for this API is that management layers that use libvirt usually poll for statistics using various split up APIs we currently provide. To get all the necessary stuff, the app needs to issue a lot of

Re: [libvirt] [PATCHv2 4/5] virsh: domain: Split out code to lookup domain from string

2014-08-26 Thread Peter Krempa
On 08/26/14 22:46, Eric Blake wrote: On 08/26/2014 08:14 AM, Peter Krempa wrote: Split out guts of the function to reuse it to get domain objects from string. --- tools/virsh-domain.c | 80 +--- tools/virsh-domain.h | 4 +++ 2 files

Re: [libvirt] [PATCH 1/3] Introduce virDomainOpenGraphicsFD API

2014-08-26 Thread Eric Blake
On 08/25/2014 12:22 PM, Ján Tomko wrote: Define the public API implementation and declare internal driver prototype. --- include/libvirt/libvirt.h.in | 5 src/driver.h | 7 ++ src/libvirt.c| 58

Re: [libvirt] [libvirt-python PATCH] Implement virDomainOpenGraphicsFD

2014-08-26 Thread Eric Blake
On 08/26/2014 11:39 AM, Peter Krempa wrote: On 08/26/14 16:43, Ján Tomko wrote: --- generator.py | 1 + libvirt-override-api.xml | 7 +++ libvirt-override.c | 37 + 3 files changed, 45 insertions(+) +py_retval =

Re: [libvirt] [PATCH 4/4] qemu: Allow use of iothreads for disk definitions

2014-08-26 Thread John Ferlan
On 08/26/2014 01:03 AM, Martin Kletzander wrote: On Mon, Aug 25, 2014 at 08:38:09PM -0400, John Ferlan wrote: diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 287a3f3..740b6ec 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3862,6 +3862,9 @@

[libvirt] [PATCH] API: Tweak virDomainOpenGraphics to return fd directly

2014-08-26 Thread Eric Blake
Let's fix this before we bake in a painful API. Since we know that we have exactly one non-negative fd on success, we might as well return the fd directly instead of forcing the user to pass in a pointer. Fix a memory leak I found while reviewing. * include/libvirt/libvirt.h.in

Re: [libvirt] Plan for the next release

2014-08-26 Thread Eric Blake
On 08/25/2014 06:34 AM, Peter Krempa wrote: On 08/20/14 13:26, Daniel Veillard wrote: We already have a number of commits in, over 150, I can't freeze next monday but I could do this next Tuesday (the 26) for a planned release around Sep 1st, So unless there is a good reason to change

Re: [libvirt] [PATCH 1/4] domain_conf: Introduce iothreads XML

2014-08-26 Thread Eric Blake
On 08/25/2014 06:38 PM, John Ferlan wrote: Introduce XML to allowing adding iothreads to the domain. These can be used by virtio-blk-pci devices in order to assign a specific thread to handle the workload for the device. The iothreads are the official implementation of the virtio-blk Data

Re: [libvirt] [PATCH 2/3] Add RPC implementation for virDomainOpenGraphicsFd

2014-08-26 Thread Eric Blake
On 08/25/2014 12:22 PM, Ján Tomko wrote: --- daemon/remote.c | 42 ++ src/remote/remote_driver.c | 39 +++ src/remote/remote_protocol.x | 15 ++- src/rpc/virnetmessage.c | 26

[libvirt] [PATCH v2 0/4] Introduce support for virtio-blk-pci iothreads

2014-08-26 Thread John Ferlan
v1: http://www.redhat.com/archives/libvir-list/2014-August/msg01155.html Changes since v1 Patches 1-3 - purely from code review Patch 4 - rework the checking of the to be added disk that has the iothread property set to be done during qemuBuildDriveDevStr() after the config check. This

[libvirt] [PATCH v2 3/4] domain_conf: Add support for iothreads in disk definition

2014-08-26 Thread John Ferlan
Add a new disk driver attribute iothread to be parsed as the thread number for the disk to use. In order to more easily facilitate the usage and configuration of the iothread, a zero for the attribute indicates iothreads are not supported for the device and a positive value indicates the specific

[libvirt] [PATCH v2 2/4] qemu: Add support for iothreads

2014-08-26 Thread John Ferlan
Add a new capability to ensure the iothreads feature exists for the qemu emulator being run - requires the query-iothreads QMP command. Using the domain XML add correspoding command argument in order to generate the threads. The iothreads will use a name space iothread# where, the future patch to

[libvirt] [PATCH v2 4/4] qemu: Allow use of iothreads for disk definitions

2014-08-26 Thread John Ferlan
For virtio-blk-pci disks with the disk iothread attribute that are running the correct emulator, add the iothread=iothread# to the -device command line in order to enable iothreads for the disk. This code will check both the start and hotplug paths for the capability, whether the iothreadsmap has

[libvirt] [PATCH v2 1/4] domain_conf: Introduce iothreads XML

2014-08-26 Thread John Ferlan
Introduce XML to allowing adding iothreads to the domain. These can be used by virtio-blk-pci devices in order to assign a specific thread to handle the workload for the device. The iothreads are the official implementation of the virtio-blk Data Plane that's been in tech preview for QEMU.

Re: [libvirt] [PATCH] API: Tweak virDomainOpenGraphics to return fd directly

2014-08-26 Thread Jiri Denemark
On Tue, Aug 26, 2014 at 16:05:44 -0600, Eric Blake wrote: Let's fix this before we bake in a painful API. Since we know that we have exactly one non-negative fd on success, we might as well return the fd directly instead of forcing the user to pass in a pointer. Fix a memory leak I found

Re: [libvirt] [PATCH 3/3] Wire up virDomainOpenGraphicsFD in QEMU driver

2014-08-26 Thread Eric Blake
On 08/25/2014 12:22 PM, Ján Tomko wrote: Should fix https://bugzilla.redhat.com/show_bug.cgi?id=26 --- src/qemu/qemu_driver.c | 80 ++ 1 file changed, 80 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

Re: [libvirt] [PATCH] API: Tweak virDomainOpenGraphics to return fd directly

2014-08-26 Thread Eric Blake
On 08/26/2014 04:18 PM, Jiri Denemark wrote: On Tue, Aug 26, 2014 at 16:05:44 -0600, Eric Blake wrote: Let's fix this before we bake in a painful API. Since we know that we have exactly one non-negative fd on success, we might as well return the fd directly instead of forcing the user to

[libvirt] [PATCH] qemu: call endjob in RevertToSnapshot

2014-08-26 Thread Jincheng Miao
In qemuDomainRevertToSnapshot(), it will check snap-def-state. But when the state is PMSUSPENDED/NOSTATE/BLOCKED, it forgets to call qemuDomainObjEndJob. Signed-off-by: Jincheng Miao jm...@redhat.com --- src/qemu/qemu_driver.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff

Re: [libvirt] [PATCH] qemu: call endjob in RevertToSnapshot

2014-08-26 Thread Eric Blake
On 08/26/2014 08:10 PM, Jincheng Miao wrote: In qemuDomainRevertToSnapshot(), it will check snap-def-state. But when the state is PMSUSPENDED/NOSTATE/BLOCKED, it forgets to call qemuDomainObjEndJob. Signed-off-by: Jincheng Miao jm...@redhat.com --- src/qemu/qemu_driver.c |4 ++-- 1

Re: [libvirt] [PATCH 4/4] qemu: Allow use of iothreads for disk definitions

2014-08-26 Thread Martin Kletzander
On Tue, Aug 26, 2014 at 06:03:46PM -0400, John Ferlan wrote: On 08/26/2014 01:03 AM, Martin Kletzander wrote: On Mon, Aug 25, 2014 at 08:38:09PM -0400, John Ferlan wrote: diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 287a3f3..740b6ec 100644 ---

Re: [libvirt] [PATCH v2 2/8] blockcopy: split out virsh implementation

2014-08-26 Thread Eric Blake
On 08/26/2014 09:00 AM, Peter Krempa wrote: On 08/26/14 13:21, Eric Blake wrote: I'm about to extend the capabilities of blockcopy. Hiding a few common lines of implementation gets in the way of the new required logic, and putting the new logic in the common implementation won't benefit any

Re: [libvirt] [PATCH v2 5/8] blockcopy: tweak how rebase calls into copy

2014-08-26 Thread Eric Blake
On 08/26/2014 09:27 AM, Peter Krempa wrote: On 08/26/14 13:21, Eric Blake wrote: In order to implement the new virDomainBlockCopy, the existing block copy internal implementation needs to be adjusted. The new function will parse XML into a storage source, and parse typed parameters into

Re: [libvirt] [PATCH v2 6/8] blockcopy: add a way to parse disk source

2014-08-26 Thread Eric Blake
On 08/26/2014 09:41 AM, Peter Krempa wrote: On 08/26/14 13:21, Eric Blake wrote: The new blockcopy API wants to reuse only a subset of the disk hotplug parser - namely, we only care about the embedded virStorageSourcePtr inside a disk XML. Strange as it may seem, it was easier to just parse

Re: [libvirt] [PATCH v2 7/8] blockcopy: add qemu implementation of new API

2014-08-26 Thread Eric Blake
On 08/26/2014 09:46 AM, Peter Krempa wrote: On 08/26/14 13:21, Eric Blake wrote: The hard part of managing the disk copy is already coded; all this had to do was convert the XML and virTypedParameters into the internal representation. With this patch, all blockcopy operations that used the

Re: [libvirt] [PATCH v2 8/8] blockcopy: add qemu implementation of new tunables

2014-08-26 Thread Eric Blake
On 08/26/2014 09:54 AM, Peter Krempa wrote: On 08/26/14 13:21, Eric Blake wrote: Upstream qemu 1.4 added some drive-mirror tunables not present when it was first introduced in 1.3. Management apps may want to set these in some cases (for example, without tuning granularity down to sector

[libvirt] [PATCH] blockcopy: allow larger buf-size

2014-08-26 Thread Eric Blake
While qemu definitely caps granularity to 64 MiB, it places no limits on buf-size. On a machine beefy enough for lots of memory, a buf-size larger than 2 GiB is feasible, so we should pass a 64-bit parameter. * include/libvirt/libvirt.h.in (VIR_DOMAIN_BLOCK_COPY_BUF_SIZE): Allow 64 bits.

<    1   2