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 updated

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

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 10/11] qemu: bulk stats: implement block group

2014-09-01 Thread Francesco Romani
- Original Message - From: Li Wei l...@cn.fujitsu.com To: Francesco Romani from...@redhat.com, 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

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

2014-09-01 Thread Markus Armbruster
Cc'ing libvirt following Stefan's lead. Benoît Canet benoit.ca...@irqsave.net 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

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 benoit.ca...@irqsave.net writes: Hi, I collected some items of a cloud provider wishlist regarding I/O accouting. Feedback from real power-users, lovely! In

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

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

[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 moon.wang...@huawei.com --- src/lxc/lxc_container.c | 4 1 file changed, 4 insertions(+) diff --git

[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 moon.wang...@huawei.com --- 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 ---

[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 moon.wang...@huawei.com --- 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

[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 moon.wang...@huawei.com --- 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

[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

[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 moon.wang...@huawei.com --- 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

[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 moon.wang...@huawei.com --- tests/commandhelper.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git

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

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

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 loader/ 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

[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

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

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 benoit.ca...@irqsave.net writes: The Monday 01 Sep 2014 à 11:52:00 (+0200), Markus Armbruster wrote : Cc'ing libvirt following Stefan's lead. Benoît Canet benoit.ca...@irqsave.net writes: Hi,

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

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

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 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. *

[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.

[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 jdene...@redhat.com ---

[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.

[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 jdene...@redhat.com --- tools/virsh-domain.c | 27 --- tools/virsh.pod | 5 +++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/tools/virsh-domain.c

[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 jdene...@redhat.com ---

[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 jdene...@redhat.com --- include/libvirt/libvirt.h.in | 11 +++ src/libvirt.c| 8

[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

[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 loader/ and introduce nvram/ qemu: Implement extended loader and nvram qemu: Automatically create NVRAM store docs/formatdomain.html.in |

[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 loader and the second one nvram. Moreover, these

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

2014-09-01 Thread Michal Privoznik
Up to now, users can configure BIOS via the loader/ 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

[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

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

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

2014-09-01 Thread Pavel Hrdina
From: Peter Krempa pkre...@redhat.com 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 pkre...@redhat.com Signed-off-by: Pavel Hrdina phrd...@redhat.com --- generator.py | 1 +

[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:

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

2014-09-01 Thread Pavel Hrdina
From: Peter Krempa pkre...@redhat.com 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 pkre...@redhat.com Signed-off-by: Pavel Hrdina phrd...@redhat.com --- 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

[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 pkre...@redhat.com Signed-off-by: Pavel Hrdina phrd...@redhat.com --- generator.py | 1 +

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

2014-09-01 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina phrd...@redhat.com --- 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

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 pkre...@redhat.com 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 pkre...@redhat.com Signed-off-by: Pavel Hrdina

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 pkre...@redhat.com 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 pkre...@redhat.com Signed-off-by: Pavel Hrdina

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 pkre...@redhat.com Signed-off-by: Pavel Hrdina phrd...@redhat.com --- generator.py

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 phrd...@redhat.com --- generator.py | 1 + libvirt-override-api.xml | 10 ++ libvirt-override.c | 33 + 3 files changed, 44 insertions(+) diff --git

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 level of

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

2014-09-01 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina phrd...@redhat.com --- 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

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 phrd...@redhat.com --- new from v2: - removed parameter nparams - make params optional generator.py | 1 + libvirt-override-api.xml | 9 + libvirt-override.c | 33

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 phrd...@redhat.com --- new from v2: - removed parameter nparams - make params optional generator.py | 1 + libvirt-override-api.xml | 9 +