Re: [libvirt] [python PATCH v3 5/5] Implement API bindings for virDomainBlockCopy

2014-09-01 Thread Pavel Hrdina
On 09/02/2014 12:17 AM, Peter Krempa wrote: > On 09/02/14 00:08, Pavel Hrdina wrote: >> Signed-off-by: Pavel Hrdina >> --- >> >> new from v2: >> - removed parameter nparams >> - make params optional >> >> generator.py | 1 + >> libvirt-override-api.xml | 9 + >> libvirt-over

Re: [libvirt] [python PATCH v3 5/5] Implement API bindings for virDomainBlockCopy

2014-09-01 Thread Peter Krempa
On 09/02/14 00:08, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > > new from v2: > - removed parameter nparams > - make params optional > > generator.py | 1 + > libvirt-override-api.xml | 9 + > libvirt-override.c | 33 + >

[libvirt] [python PATCH v3 5/5] Implement API bindings for virDomainBlockCopy

2014-09-01 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- new from v2: - removed parameter nparams - make params optional generator.py | 1 + libvirt-override-api.xml | 9 + libvirt-override.c | 33 + 3 files changed, 43 insertions(+) diff --git a/generator.py

Re: [libvirt] [python PATCH v2 1/5] generator: resolve one level of enum reference

2014-09-01 Thread Peter Krempa
On 09/01/14 22:18, Pavel Hrdina wrote: > In the libvirt.h we have one enum defined by references from another > enum and it leads in wrong order of definitons in python code. To > prevent this we should resolve that references before we generate the > python code. > > For now we have only one leve

Re: [libvirt] [python PATCH v2 5/5] Implement API bindings for virDomainBlockCopy

2014-09-01 Thread Peter Krempa
On 09/01/14 22:18, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > generator.py | 1 + > libvirt-override-api.xml | 10 ++ > libvirt-override.c | 33 + > 3 files changed, 44 insertions(+) > > diff --git a/generator.py b/generat

Re: [libvirt] [python PATCH v2 4/5] API: Implement bindings for virDomainListGetStats

2014-09-01 Thread Peter Krempa
On 09/01/14 22:18, Pavel Hrdina wrote: > Implement the function by returning a list of tuples instead the array > of virDomainStatsRecords and store the typed parameters as dict. > > Signed-off-by: Peter Krempa > Signed-off-by: Pavel Hrdina > --- > generator.py | 1 + > libvi

Re: [libvirt] [python PATCH v2 3/5] API: Implement bindings for virConnectGetAllDomainStats

2014-09-01 Thread Peter Krempa
On 09/01/14 22:18, Pavel Hrdina wrote: > From: Peter Krempa > > Implement the function by returning a list of tuples instead the array > of virDomainStatsRecords and store the typed parameters as dict. > > Signed-off-by: Peter Krempa > Signed-off-by: Pavel Hrdina > --- > generator.py

Re: [libvirt] [python PATCH v2 2/5] API: Skip 'virDomainStatsRecordListFree'

2014-09-01 Thread Peter Krempa
On 09/01/14 22:18, Pavel Hrdina wrote: > From: Peter Krempa > > The new API function doesn't make sense to be exported in python. The > bindings will return native types instead of the struct array. > > Signed-off-by: Peter Krempa > Signed-off-by: Pavel Hrdina > --- > generator.py | 1 + > s

[libvirt] [python PATCH v2 5/5] Implement API bindings for virDomainBlockCopy

2014-09-01 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- generator.py | 1 + libvirt-override-api.xml | 10 ++ libvirt-override.c | 33 + 3 files changed, 44 insertions(+) diff --git a/generator.py b/generator.py index 1daf866..a798274 100755 --- a/generator.py

[libvirt] [python PATCH v2 1/5] generator: resolve one level of enum reference

2014-09-01 Thread Pavel Hrdina
In the libvirt.h we have one enum defined by references from another enum and it leads in wrong order of definitons in python code. To prevent this we should resolve that references before we generate the python code. For now we have only one level of references so we will count with that in the g

[libvirt] [python PATCH v2 4/5] API: Implement bindings for virDomainListGetStats

2014-09-01 Thread Pavel Hrdina
Implement the function by returning a list of tuples instead the array of virDomainStatsRecords and store the typed parameters as dict. Signed-off-by: Peter Krempa Signed-off-by: Pavel Hrdina --- generator.py | 1 + libvirt-override-virConnect.py | 47

[libvirt] [python PATCH v2 3/5] API: Implement bindings for virConnectGetAllDomainStats

2014-09-01 Thread Pavel Hrdina
From: Peter Krempa Implement the function by returning a list of tuples instead the array of virDomainStatsRecords and store the typed parameters as dict. Signed-off-by: Peter Krempa Signed-off-by: Pavel Hrdina --- generator.py | 1 + libvirt-override-virConnect.py | 53 +++

[libvirt] [python PATCH v2 0/5] Implement new APIs

2014-09-01 Thread Pavel Hrdina
new in v2: - moved function to appropriate place in libvirt-override.c - fixed generator to resolve enum reference - fixed memory leak in virDomainListGetStats and sanyti test - implemented API for virDomainBlockCopy Pavel Hrdina (3): generator: resolve one level of enum reference API: Impleme

[libvirt] [python PATCH v2 2/5] API: Skip 'virDomainStatsRecordListFree'

2014-09-01 Thread Pavel Hrdina
From: Peter Krempa The new API function doesn't make sense to be exported in python. The bindings will return native types instead of the struct array. Signed-off-by: Peter Krempa Signed-off-by: Pavel Hrdina --- generator.py | 1 + sanitytest.py | 3 +++ 2 files changed, 4 insertions(+) dif

Re: [libvirt] [PATCH] virsh: Implement command to rename domain

2014-09-01 Thread Tomas Meszaros
On 01/09/14 at 10:31am, Philipp Hahn wrote: > This has been requested in the past already (even by me ;-) > Renaming is not that simple, as there are several more things to do: > 1. Rename log files (this was somehow controversial last time it was > discussed, especially combined with external prog

[libvirt] [PATCH v6 3/3] qemu: Automatically create NVRAM store

2014-09-01 Thread Michal Privoznik
When using split UEFI image, it may come handy if libvirt manages per domain _VARS file automatically. While the _CODE file is RO and can be shared among multiple domains, you certainly don't want to do that on the _VARS file. This latter one needs to be per domain. So at the domain startup process

[libvirt] [PATCH v6 1/3] conf: Extend and introduce

2014-09-01 Thread Michal Privoznik
Up to now, users can configure BIOS via the element. With the upcoming implementation of UEFI this is not enough as BIOS and UEFI are conceptually different. For instance, while BIOS is ROM, UEFI is programmable flash (although all writes to code section are denied). Therefore we need new attribut

[libvirt] [PATCH v6 2/3] qemu: Implement extended loader and nvram

2014-09-01 Thread Michal Privoznik
QEMU now supports UEFI with the following command line: -drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on \ -drive file=/usr/share/OVMF/OVMF_VARS.fd,if=pflash,format=raw,unit=1 \ where the first line reflects and the second one . Moreover, these two lines obso

[libvirt] [PATCH v6 0/3] OVMF exposure

2014-09-01 Thread Michal Privoznik
Diff to v5: - changed readonly='on|off' to readonly='yes|no' - rebased to current upstream Michal Privoznik (3): conf: Extend and introduce qemu: Implement extended loader and nvram qemu: Automatically create NVRAM store docs/formatdomain.html.in | 22 +++- docs

[libvirt] [PATCH 0/6] Add support for fetching statistics of completed jobs

2014-09-01 Thread Jiri Denemark
Using virDomainGetJobStats, we can monitor running jobs but sometimes it may be useful to get statistics about a job that already finished, for example, to get the final amount of data transferred during migration or to get an idea about total downtime. This is what the following patches are about.

[libvirt] [PATCH 2/6] Add support for fetching statistics of completed jobs

2014-09-01 Thread Jiri Denemark
virDomainGetJobStats gains new VIR_DOMAIN_JOB_STATS_COMPLETED flag that can be used to fetch statistics of a completed job rather than a currently running job. Signed-off-by: Jiri Denemark --- include/libvirt/libvirt.h.in | 11 +++ src/libvirt.c| 8 +++- src/qemu/qem

[libvirt] [PATCH 3/6] virsh: Add support for completed job stats

2014-09-01 Thread Jiri Denemark
New --completed flag for virsh domjobinfo command. Signed-off-by: Jiri Denemark --- tools/virsh-domain.c | 27 --- tools/virsh.pod | 5 +++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index c75cd73..1

[libvirt] [PATCH 1/6] Refactor job statistics

2014-09-01 Thread Jiri Denemark
Job statistics data were tracked in several structures and variables. Let's make a new qemuDomainJobInfo structure which can be used as a single source of statistics data as a preparation for storing data about completed a job. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c| 157 +++

[libvirt] [PATCH 5/6] qemu: Recompute downtime and total time when migration completes

2014-09-01 Thread Jiri Denemark
Total time of a migration and total downtime transfered from a source to a destination host do not count with the transfer time to the destination host and with the time elapsed before guest CPUs are resumed. Thus, source libvirtd remembers when migration started and when guest CPUs were paused. Bo

[libvirt] [PATCH 6/6] qemu: Transfer recomputed stats back to source

2014-09-01 Thread Jiri Denemark
After previous commit, migration statistics on source and destination hosts are not equal because destination updated time statistics. Let's send the result back so that the same data can be queried on both end of a migration. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 23 +

[libvirt] [PATCH 4/6] qemu: Transfer migration statistics to destination

2014-09-01 Thread Jiri Denemark
When migrating a transient domain or with VIR_MIGRATE_UNDEFINE_SOURCE flag, the domain may disappear from source host. And so will migration statistics associated with the domain. We need to transfer the statistics at the end of a migration so that they can be queried at the destination host. Sign

Re: [libvirt] [PATCH v3 01/18] blockcopy: allow larger buf-size

2014-09-01 Thread Jiri Denemark
On Sat, Aug 30, 2014 at 22:02:19 -0600, Eric Blake wrote: > 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/

Re: [libvirt] [python PATCH 4/5] API: Implement bindings for virDomainListGetStats

2014-09-01 Thread Pavel Hrdina
On 08/28/2014 06:32 PM, Peter Krempa wrote: > Implement the function by returning a list of tuples instead the array > of virDomainStatsRecords and store the typed parameters as dict. > --- > generator.py | 1 + > libvirt-override-virConnect.py | 47 +

Re: [libvirt] [PATCH v3 00/18] Implement virDomainBlockCopy

2014-09-01 Thread Jiri Denemark
On Mon, Sep 01, 2014 at 09:39:35 +0200, Jiri Denemark wrote: > On Sat, Aug 30, 2014 at 22:02:18 -0600, Eric Blake wrote: > > Took me longer than I wanted to get v3 posted. There's lots of > > new patches in this version, based on feedback on v2. > > > > Among other things, the bandwidth of virDom

Re: [libvirt] [python PATCH 3/5] API: Implement bindings for virConnectGetAllDomainStats

2014-09-01 Thread Pavel Hrdina
On 08/28/2014 06:32 PM, Peter Krempa wrote: > Implement the function by returning a list of tuples instead the array > of virDomainStatsRecords and store the typed parameters as dict. > --- > generator.py | 1 + > libvirt-override-virConnect.py | 53 > l

Re: [libvirt] [Qemu-devel] IO accounting overhaul

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 13:41:01 (+0200), Markus Armbruster wrote : > Benoît Canet writes: > > > The Monday 01 Sep 2014 à 11:52:00 (+0200), Markus Armbruster wrote : > >> Cc'ing libvirt following Stefan's lead. > >> > >> Benoît Canet writes: > >> > >> > Hi, > >> > > >> > I collected some item

Re: [libvirt] [PATCH for 1.2.8] selinux: properly label tap FDs with imagelabel

2014-09-01 Thread Pavel Hrdina
On 09/01/2014 03:31 PM, Martin Kletzander wrote: > The cleanup in commit cf976d9d used secdef->label to label the tap > FDs, but that is not possible since it's process-only label (svirt_t) > and not a object label (e.g. svirt_image_t). Starting a domain failed > with EPERM, but simply using secde

[libvirt] [PATCH for 1.2.8] selinux: properly label tap FDs with imagelabel

2014-09-01 Thread Martin Kletzander
The cleanup in commit cf976d9d used secdef->label to label the tap FDs, but that is not possible since it's process-only label (svirt_t) and not a object label (e.g. svirt_image_t). Starting a domain failed with EPERM, but simply using secdef->label instead fixes it. Signed-off-by: Martin Kletzan

Re: [libvirt] [PATCH v4 1/3] conf: Extend and introduce

2014-09-01 Thread Michal Privoznik
On 22.08.2014 18:41, Eric Blake wrote: On 08/21/2014 02:50 AM, Michal Privoznik wrote: Up to now, users can configure BIOS via the element. With the upcoming implementation of UEFI this is not enough as BIOS and UEFI are conceptually different. For instance, while BIOS is ROM, UEFI is programma

Re: [libvirt] [PATCH v4 2/3] qemu: Implement extended loader and nvram

2014-09-01 Thread Michal Privoznik
On 22.08.2014 18:48, Eric Blake wrote: On 08/21/2014 02:50 AM, Michal Privoznik wrote: QEMU now supports UEFI with the following command line: -drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on \ -drive file=/usr/share/OVMF/OVMF_VARS.fd,if=pflash,format=raw,

[libvirt] [PATCH 1/6] tests: Resolve Coverity RESOURCE_LEAK in commandhelper

2014-09-01 Thread Wang Rui
Coverity determined that 'log' and 'newenv' were not freed in some cases. Free them in 'error' branch and normal branch. Signed-off-by: Wang Rui --- tests/commandhelper.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/commandhelper.c b/tests/commandhelp

[libvirt] [PATCH 2/6] test_conf: Resolve Coverity RESOURCE_LEAK

2014-09-01 Thread Wang Rui
If the condition 'ret < 0' is true, the code will jump to 'cleanup' and 'conf' won't be freed. Signed-off-by: Wang Rui --- tests/test_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_conf.c b/tests/test_conf.c index 05704df..4d05d8d 100644 --- a/tests/tes

[libvirt] [PATCH 0/6] Coverity patches to resolve RESOURCE_LEAK

2014-09-01 Thread Wang Rui
Another six pathes to fix resource leak. But this may not be the end. Wang Rui (6): tests: Resolve Coverity RESOURCE_LEAK in commandhelper test_conf: Resolve Coverity RESOURCE_LEAK remote: Resolve Coverity RESOURCE_LEAK qemu_process: Resolve Coverity RESOURCE_LEAK vircgroup: Resolve Cove

[libvirt] [PATCH 4/6] qemu_process: Resolve Coverity RESOURCE_LEAK

2014-09-01 Thread Wang Rui
If virSecurityManagerClearSocketLabel() fails, 'agent' won't be freed before jumping to cleanup. Signed-off-by: Wang Rui --- src/qemu/qemu_process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f68dfbe..79f4238 100644 --- a/src/qemu/

[libvirt] [PATCH 3/6] remote: Resolve Coverity RESOURCE_LEAK

2014-09-01 Thread Wang Rui
Need to free 'uri_out' on error path. Signed-off-by: Wang Rui --- daemon/remote.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/remote.c b/daemon/remote.c index 89714ca..0ea2815 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -2305,8 +2305,10 @@ remoteDispat

[libvirt] [PATCH 5/6] vircgroup: Resolve Coverity RESOURCE_LEAK

2014-09-01 Thread Wang Rui
Need to free 'root' and 'opts' before 'return -1' if symlink fails. Signed-off-by: Wang Rui --- src/util/vircgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 8b554a9..a64f081 100644 --- a/src/util/vircgroup.c +++ b/src/

[libvirt] [PATCH 6/6] lxc_container: Resolve Coverity RESOURCE_LEAK

2014-09-01 Thread Wang Rui
Memory is allocated for 'mnt_src' by VIR_STRDUP in the loop. Next loop it will be allocated again. So we need to free 'mnt_src' before continue the loop. Signed-off-by: Wang Rui --- src/lxc/lxc_container.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lxc/lxc_container.c b/src/lxc/

Re: [libvirt] [Qemu-devel] IO accounting overhaul

2014-09-01 Thread Markus Armbruster
Benoît Canet writes: > The Monday 01 Sep 2014 à 11:52:00 (+0200), Markus Armbruster wrote : >> Cc'ing libvirt following Stefan's lead. >> >> Benoît Canet writes: >> >> > Hi, >> > >> > I collected some items of a cloud provider wishlist regarding I/O >> > accouting. >> >> Feedback from real p

Re: [libvirt] [Qemu-devel] IO accounting overhaul

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 11:52:00 (+0200), Markus Armbruster wrote : > Cc'ing libvirt following Stefan's lead. > > Benoît Canet writes: > > > Hi, > > > > I collected some items of a cloud provider wishlist regarding I/O accouting. > > Feedback from real power-users, lovely! > > > In a cloud I/

Re: [libvirt] [Qemu-devel] IO accounting overhaul

2014-09-01 Thread Markus Armbruster
Cc'ing libvirt following Stefan's lead. Benoît Canet writes: > Hi, > > I collected some items of a cloud provider wishlist regarding I/O accouting. Feedback from real power-users, lovely! > In a cloud I/O accouting can have 3 purpose: billing, helping the customers > and doing metrology to hel

Re: [libvirt] [PATCH 10/11] qemu: bulk stats: implement block group

2014-09-01 Thread Francesco Romani
- Original Message - > From: "Li Wei" > To: "Francesco Romani" , libvir-list@redhat.com > Sent: Monday, September 1, 2014 7:32:37 AM > Subject: Re: [libvirt] [PATCH 10/11] qemu: bulk stats: implement block group > > Hi Francesco, > > I notice your patchset is much complete than mine wh

Re: [libvirt] [PATCH] Fix connection to already running session libvirtd

2014-09-01 Thread Christophe Fergeau
Hi, On Fri, Aug 29, 2014 at 10:22:33AM -0600, Eric Blake wrote: > Sometimes, when a patch is that invasive, I'll do it in two parts - the > change with wrong indentation, followed by another patch that is > indentation-only. Much easier to review. Ah right, I remember seeing that in the past, I

Re: [libvirt] [PATCH] virsh: Implement command to rename domain

2014-09-01 Thread Philipp Hahn
Hello Tomas, On 01.09.2014 01:51, Tomas Meszaros wrote: > I've recently worked with rather large number of virtual machines > and needed to rename all domains. I couldn't find better way how > to rename domain other than: > > virsh dumpxml domain > domain.xml > (change domain name in doma

Re: [libvirt] [PATCH v3 00/18] Implement virDomainBlockCopy

2014-09-01 Thread Jiri Denemark
On Sat, Aug 30, 2014 at 22:02:18 -0600, Eric Blake wrote: > Took me longer than I wanted to get v3 posted. There's lots of > new patches in this version, based on feedback on v2. > > Among other things, the bandwidth of virDomainBlockCopy is in > bytes/s, and all the remaining interfaces are upda