Re: [libvirt] [PATCHv4 8/8] storage: probe qcow2 volumes in gluster pool

2013-11-26 Thread Daniel P. Berrange
On Mon, Nov 25, 2013 at 01:45:54PM -0700, Eric Blake wrote: On 11/25/2013 08:59 AM, Daniel P. Berrange wrote: On Fri, Nov 22, 2013 at 08:20:30PM -0700, Eric Blake wrote: Putting together pieces from previous patches, it is now possible for 'virsh vol-dumpxml --pool gluster volname' to

Re: [libvirt] [libvirt-test-API][PATCH] Fix utils.exec_cmd output problem

2013-11-26 Thread Jincheng Miao
Thanks for review, yes, I missed this situation: stdout is not the subprocess.PIPE. Since the stderr is always subprocess.PIPE, my another way is err after Popen.communicate(). The patch looks like: --- utils/utils.py | 2 ++--- 1 file changed, 2 insertions(+) diff --git a/utils/utils.py

Re: [libvirt] [libvirt-users] Help required in simulating libvirt TLS server

2013-11-26 Thread Daniel P. Berrange
On Mon, Nov 25, 2013 at 11:29:42PM +0530, Arun Viswanath wrote: Hi All, Will some one explain how is this tls libvirt server is implemented. For my testing purpose I need to implement the similar TLS server in Java or Python and this server is capable to receive all libvirt calls like

Re: [libvirt] Entering freeze for 1.2.0, rc1 available

2013-11-26 Thread Daniel P. Berrange
On Tue, Nov 26, 2013 at 11:56:09AM +0800, Daniel Veillard wrote: So as planned we are entering freeze for libvirt-1.2.0, I just tagged the git trees - plural as we now use libvirt-python separate git for this binding - and pushed tarballs and rpms to the usual place at:

Re: [libvirt] Entering freeze for 1.2.0, rc1 available

2013-11-26 Thread Daniel Veillard
On Tue, Nov 26, 2013 at 09:25:51AM +, Daniel P. Berrange wrote: On Tue, Nov 26, 2013 at 11:56:09AM +0800, Daniel Veillard wrote: So as planned we are entering freeze for libvirt-1.2.0, I just tagged the git trees - plural as we now use libvirt-python separate git for this binding -

[libvirt] [libvirt-python PATCH] Make setup.py executable

2013-11-26 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- setup.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 = 100755 setup.py diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 -- 1.8.4.3 -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [libvirt-python PATCH] setup: Make libvirt API XML path configurable

2013-11-26 Thread Martin Kletzander
Adding a support for LIBVIRT_API_PATH evironment variable, which can control where the script should look for the 'libvirt-api.xml' file. This allows building libvirt-python against different libvirt than the one installed in the system. This may be used for example in autotest or by packagers

Re: [libvirt] [PATCHv6 1/5] Add a hostdev PCI backend type

2013-11-26 Thread Laine Stump
On 11/26/2013 04:09 AM, Jim Fehlig wrote: When Chunyan originally submitted the patch adding PCI passthrough support in the libxl driver, it was noted that a lot of the code is not qemu-specific, based on the amount of copy-and-paste, and hence the request for common code :-). Yes. It's

Re: [libvirt] [libvirt-python PATCH] setup: Make libvirt API XML path configurable

2013-11-26 Thread Daniel P. Berrange
On Tue, Nov 26, 2013 at 10:58:25AM +0100, Martin Kletzander wrote: Adding a support for LIBVIRT_API_PATH evironment variable, which can control where the script should look for the 'libvirt-api.xml' file. This allows building libvirt-python against different libvirt than the one installed in

Re: [libvirt] [libvirt-python PATCH] Make setup.py executable

2013-11-26 Thread Daniel P. Berrange
On Tue, Nov 26, 2013 at 10:58:13AM +0100, Martin Kletzander wrote: Signed-off-by: Martin Kletzander mklet...@redhat.com --- setup.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 = 100755 setup.py diff --git a/setup.py b/setup.py old mode 100644 new mode

Re: [libvirt] VirtIO-SCSI disks limitation

2013-11-26 Thread Osier Yang
[[ TO libvir-list ]] Hi, Daniel, I'm going to share the thread to public list for further discussion. Hope you don't mind. On 26/11/13 02:37, Daniel Erez wrote: Hi Osier, It seems there's a limitation in libvirt that allows up to six disks in a virtio-scsi controller. I.e. when sending

Re: [libvirt] VirtIO-SCSI disks limitation

2013-11-26 Thread Daniel P. Berrange
On Tue, Nov 26, 2013 at 06:24:02PM +0800, Osier Yang wrote: [[ TO libvir-list ]] Hi, Daniel, I'm going to share the thread to public list for further discussion. Hope you don't mind. On 26/11/13 02:37, Daniel Erez wrote: Hi Osier, It seems there's a limitation in libvirt that

Re: [libvirt] [PATCH] Fix three minor typos

2013-11-26 Thread Osier Yang
On 26/11/13 15:15, Yuri Chornoivan wrote: -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list ACK and pushed. Thanks for the patch, but please consider posting the patch with git-email. Regards, Osier -- libvir-list mailing list

Re: [libvirt] [PATCH 0/3] SASL valgrind fixes

2013-11-26 Thread Christophe Fergeau
On Fri, Nov 22, 2013 at 01:00:59PM -0700, Eric Blake wrote: On 11/22/2013 10:00 AM, Christophe Fergeau wrote: Hey, While running virsh through valgrind for some SASL tests, I triggered some leaks/invalid reads, this patch series fixes these. ACK series. I did not get to push these

Re: [libvirt] [PATCH 0/3] SASL valgrind fixes

2013-11-26 Thread Daniel P. Berrange
On Tue, Nov 26, 2013 at 11:41:12AM +0100, Christophe Fergeau wrote: On Fri, Nov 22, 2013 at 01:00:59PM -0700, Eric Blake wrote: On 11/22/2013 10:00 AM, Christophe Fergeau wrote: Hey, While running virsh through valgrind for some SASL tests, I triggered some leaks/invalid reads,

Re: [libvirt] [PATCH v3] sasl: Fix authentication when using PLAIN mechanism

2013-11-26 Thread Christophe Fergeau
On Fri, Nov 22, 2013 at 12:58:27PM -0700, Eric Blake wrote: On 11/22/2013 10:26 AM, Christophe Fergeau wrote: With some authentication mechanism (PLAIN for example), sasl_client_start() can return SASL_OK, which translates to virNetSASLSessionClientStart() returning VIR_NET_SASL_COMPLETE.

Re: [libvirt] [PATCH 0/3] SASL valgrind fixes

2013-11-26 Thread Christophe Fergeau
On Tue, Nov 26, 2013 at 10:43:15AM +, Daniel P. Berrange wrote: On Tue, Nov 26, 2013 at 11:41:12AM +0100, Christophe Fergeau wrote: On Fri, Nov 22, 2013 at 01:00:59PM -0700, Eric Blake wrote: On 11/22/2013 10:00 AM, Christophe Fergeau wrote: Hey, While running virsh through

Re: [libvirt] [RFC PATCH] libvirt support to force convergence of live guest migration

2013-11-26 Thread Jiri Denemark
On Thu, Nov 21, 2013 at 17:47:24 -0800, Chegu Vinod wrote: Busy enterprise workloads hosted on large sized VM's tend to dirty memory faster than the transfer rate achieved via live guest migration. Despite some good recent improvements ( using dedicated 10Gig NICs between hosts) the live

Re: [libvirt] [RFC PATCH] libvirt support to force convergence of live guest migration

2013-11-26 Thread Paolo Bonzini
Il 26/11/2013 13:24, Jiri Denemark ha scritto: Hmm, I know you are just following what I did with VIR_MIGRATE_COMPRESSED, but setting auto-converge on destination doesn't make any sense. And it doesn't even make a lot of sense to set compression on destination (other than checking the

Re: [libvirt] VirtIO-SCSI disks limitation

2013-11-26 Thread Daniel Erez
- Original Message - From: Osier Yang jy...@redhat.com To: libvir-list@redhat.com Cc: Daniel Erez de...@redhat.com Sent: Tuesday, November 26, 2013 12:24:02 PM Subject: Re: VirtIO-SCSI disks limitation [[ TO libvir-list ]] Hi, Daniel, I'm going to share the thread to public

Re: [libvirt] [libvirt-python PATCH] Make setup.py executable

2013-11-26 Thread Martin Kletzander
On Tue, Nov 26, 2013 at 10:15:50AM +, Daniel P. Berrange wrote: On Tue, Nov 26, 2013 at 10:58:13AM +0100, Martin Kletzander wrote: Signed-off-by: Martin Kletzander mklet...@redhat.com --- setup.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 = 100755

Re: [libvirt] [PATCH v2] Pin guest to memory node on NUMA system

2013-11-26 Thread Shivaprasad bhat
Thanks Martin. I use stgit. I need to figure out how to put the notes in the format you mentioned. Sending you the V3 addressing your comments. Regards, Shiva On Mon, Nov 25, 2013 at 3:01 PM, Martin Kletzander mklet...@redhat.com wrote: On Tue, Nov 19, 2013 at 09:36:49AM -0500, Shivaprasad G

[libvirt] [PATCH v3] Pin guest to memory node on NUMA system

2013-11-26 Thread Shivaprasad G Bhat
Version 3: Addressed comments on V2. Version 2: Fixed the string formatting errors in v1. The patch contains the fix for defect 1009880 reported at redhat bugzilla. The root cause is, ever since the subcpusets(vcpu,emulator) were introduced, the parent cpuset cannot be modified to remove the

Re: [libvirt] [Qemu-devel] [PATCH] virtio-rng: correct the default limit rate

2013-11-26 Thread Eric Blake
[adding libvirt] On 11/26/2013 06:58 AM, Paolo Bonzini wrote: Il 26/11/2013 14:43, Amos Kong ha scritto: /* Set a default rate limit of 2^47 bytes per minute or roughly 2TB/s. If * you have an entropy source capable of generating more entropy than this * and you can pass it through via

Re: [libvirt] [libvirt-python PATCH] setup: Make libvirt API XML path configurable

2013-11-26 Thread Martin Kletzander
On Tue, Nov 26, 2013 at 10:14:36AM +, Daniel P. Berrange wrote: On Tue, Nov 26, 2013 at 10:58:25AM +0100, Martin Kletzander wrote: Adding a support for LIBVIRT_API_PATH evironment variable, which can control where the script should look for the 'libvirt-api.xml' file. This allows

Re: [libvirt] [Qemu-devel] [PATCH] virtio-rng: correct the default limit rate

2013-11-26 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 26/11/2013 15:32, Eric Blake ha scritto: Hmm. Libvirt is already converting a user's rate of bytes/period into the qemu parameters, defaulting to 1 second as its default period. Am I correct that as long as libvirt specified both rate AND

[libvirt] newer libvirt version issues

2013-11-26 Thread Franky Van Liedekerke
Hi, since we're running more than 20 hosts per KVM server, we needed to update libvirt to at least 1.1.2 for virtlockd to be able to cope with this (due to an old hardcoded limit that was in there before). But where 1.1.0 compiles and runs just fine on a fully-patched CentOS 6.4 server,

Re: [libvirt] newer libvirt version issues

2013-11-26 Thread Eric Blake
On 11/26/2013 08:06 AM, Franky Van Liedekerke wrote: apparently the %doc entries that are different with 1.1.2 prevent rpmbuild to succeed on CentOS servers. Using the %doc lines as per the 1.1.2 spec file results in a working rpmbuild. Should be fixed in caaeb69. The 1.1.4 version has

Re: [libvirt] [Qemu-devel] [PATCH] virtio-rng: correct the default limit rate

2013-11-26 Thread Amos Kong
On Tue, Nov 26, 2013 at 07:32:37AM -0700, Eric Blake wrote: [adding libvirt] On 11/26/2013 06:58 AM, Paolo Bonzini wrote: Il 26/11/2013 14:43, Amos Kong ha scritto: /* Set a default rate limit of 2^47 bytes per minute or roughly 2TB/s. If * you have an entropy source capable of

Re: [libvirt] [Qemu-devel] [PATCH] virtio-rng: correct the default limit rate

2013-11-26 Thread Eric Blake
On 11/26/2013 08:23 AM, Amos Kong wrote: Hmm. Libvirt is already converting a user's rate of bytes/period into the qemu parameters, defaulting to 1 second as its default period. So libvirt will always pass a fixed 1 second period to qemu? You forced me to check the code :) We're safe.

Re: [libvirt] newer libvirt version issues

2013-11-26 Thread Michal Privoznik
On 26.11.2013 16:06, Franky Van Liedekerke wrote: Hi, since we're running more than 20 hosts per KVM server, we needed to update libvirt to at least 1.1.2 for virtlockd to be able to cope with this (due to an old hardcoded limit that was in there before). But where 1.1.0 compiles and runs

[libvirt] [PATCHv1.5 00/27] Gluster snapshot support (RFC) and refactors

2013-11-26 Thread Peter Krempa
This version was rebased on top of Eric's gluster pool series and a few small mistakes were fixed. As nobody actually reviewed the original posting I did not bother putting the differences in the patches. Peter Krempa (27): conf: Export virStorageVolType enum helper functions test: Implement

[libvirt] [PATCHv1.5 01/27] conf: Export virStorageVolType enum helper functions

2013-11-26 Thread Peter Krempa
Export string conversion from and to the virStorageVolType enum. --- src/libvirt_private.syms | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index a705c56..205fe56 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@

[libvirt] [PATCHv1.5 02/27] test: Implement fake storage pool driver in qemuxml2argv test

2013-11-26 Thread Peter Krempa
To support testing of volume disk backing, we need to implement a few disk driver backend functions. The fake storage driver uses files in storagepoolxml2xmlout/POOLNAME.xml as XML files for pool definitions and volume names are in format VOL_TYPE+VOL_PATH. By default type block is assumed (for

[libvirt] [PATCHv1.5 05/27] qemu: Split out formatting of network disk source URI

2013-11-26 Thread Peter Krempa
The snapshot code will need to use qemu-style formatted URIs of network disks. Split out the code to avoid duplication. --- src/qemu/qemu_command.c | 146 src/qemu/qemu_command.h | 6 ++ 2 files changed, 91 insertions(+), 61 deletions(-) diff

[libvirt] [PATCHv1.5 06/27] qemu: Simplify call pattern of qemuBuildDriveURIString

2013-11-26 Thread Peter Krempa
Automatically assign secret type from the disk source definition and pull in adding of the comma. Then update callers to keep generated output the same. --- src/qemu/qemu_command.c | 34 +- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git

[libvirt] [PATCHv1.5 03/27] qemuxml2argv: Add test to verify correct usage of disk type=volume

2013-11-26 Thread Peter Krempa
Tweak the existing file to test command line generator too. --- tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.args | 8 tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml | 2 +- tests/qemuxml2argvtest.c | 2 ++ 3 files changed, 11

[libvirt] [PATCHv1.5 04/27] qemuxml2argv: Add test for disk type='volume' with iSCSI pools

2013-11-26 Thread Peter Krempa
Tweak the existing file so that it can be tested for command line corectness. --- src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 + src/qemu/qemu_command.c| 76 +--- src/qemu/qemu_conf.c

[libvirt] [PATCHv1.5 10/27] qemu: Unify formatting of RBD sources

2013-11-26 Thread Peter Krempa
--- src/qemu/qemu_command.c | 155 +++- 1 file changed, 61 insertions(+), 94 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 15a6e9b..799209d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@

[libvirt] [PATCHv1.5 17/27] snapshot: conf: Fix NULL dereference when driver element is empty

2013-11-26 Thread Peter Krempa
Consider the following valid snapshot XML as the driver element is allowed to be empty in the domainsnapshot.rng schema: $ cat snap.xml domainsnapshot disks disk name='vda' snapshot='external' source file='/tmp/foo'/ driver/ /disk /disks /domainsnapshot produces the

[libvirt] [PATCHv1.5 09/27] qemu: Split out NBD command generation

2013-11-26 Thread Peter Krempa
--- src/qemu/qemu_command.c | 117 +--- 1 file changed, 61 insertions(+), 56 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6ba8df9..15a6e9b 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@

[libvirt] [PATCHv1.5 12/27] conf: Support disk source formatting without needing a virDomainDiskDefPtr

2013-11-26 Thread Peter Krempa
The source element formatting function was expecting a virDomainDiskDefPtr to store the data. As snapshots are not using this data structure to hold the data, we need to add an internal function which splits out individual fields separately. --- src/conf/domain_conf.c | 129

[libvirt] [PATCHv1.5 07/27] qemu: Use qemuBuildNetworkDriveURI to handle http/ftp and friends

2013-11-26 Thread Peter Krempa
Prepare the function to integrate other protocols and start folding other network protocols into a common place. --- src/qemu/qemu_command.c | 199 +--- 1 file changed, 122 insertions(+), 77 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCHv1.5 11/27] qemu: Refactor disk source string formatting

2013-11-26 Thread Peter Krempa
--- src/qemu/qemu_command.c | 128 1 file changed, 86 insertions(+), 42 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 799209d..0738de2 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@

[libvirt] [PATCHv1.5 22/27] qemu: snapshot: Touch up error message

2013-11-26 Thread Peter Krempa
--- src/qemu/qemu_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d2dbaf5..96bc87e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -11858,8 +11858,8 @@

[libvirt] [PATCHv1.5 08/27] qemu: Migrate sheepdog source generation into common function

2013-11-26 Thread Peter Krempa
--- src/qemu/qemu_command.c | 37 - 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 09ebd00..6ba8df9 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3754,6 +3754,29

[libvirt] [PATCHv1.5 20/27] conf: Add helper do clear disk source authentication struct

2013-11-26 Thread Peter Krempa
Add virDomainDiskAuthClear to help cleaning out the struct in other places too. --- src/conf/domain_conf.c | 17 ++--- src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 + 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c

[libvirt] [PATCHv1.5 13/27] conf: Clean up virDomainDiskSourceDefFormatInternal

2013-11-26 Thread Peter Krempa
Avoid if statements when used with virBufferEscapeString which automaticaly omits the whole string. Also add some line breaks to visualy separate the code. --- src/conf/domain_conf.c | 48 1 file changed, 20 insertions(+), 28 deletions(-) diff

Re: [libvirt] [PATCH v2 1/2] LXC: fix the problem that libvirt lxc fail to start on latest kernel

2013-11-26 Thread Daniel P. Berrange
On Wed, Nov 20, 2013 at 10:11:08AM +0800, Gao feng wrote: After kernel commit 5ff9d8a65ce80efb509ce4e8051394e9ed2cd942 vfs: Lock in place mounts from more privileged users, unprivileged user has no rights to move the mounts that inherited from parent mountns. we use this feature to move the

[libvirt] [PATCHv1.5 14/27] conf: Split out seclabel formating code for disk source

2013-11-26 Thread Peter Krempa
The code is common for all the various disk types. Split it out to a common function. --- src/conf/domain_conf.c | 62 -- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCHv1.5 16/27] snapshot: conf: Use common parsing and formatting functions for source

2013-11-26 Thread Peter Krempa
Disk source elements for snapshots were using separate code from our config parser. As snapshots can be stored on more than just regular files, we will need the universal parser to allow us to expose a variety of snapshot disk targets. This patch reuses the config parsers and formatters to do the

[libvirt] [PATCHv1.5 21/27] qemu: Clear old translated pool source

2013-11-26 Thread Peter Krempa
Clear the old data to avoid leaking it when attempting to re-translate a pool on the same domain object. --- src/qemu/qemu_conf.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 58a0500..639e2ff 100644 --- a/src/qemu/qemu_conf.c +++

[libvirt] [PATCHv1.5 15/27] conf: Export disk source formatter and parser

2013-11-26 Thread Peter Krempa
This code will be reused in the snapshot disk definition parser. --- src/conf/domain_conf.c | 4 ++-- src/conf/domain_conf.h | 20 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 8f45f2e..0561d9d 100644

[libvirt] [PATCHv1.5 23/27] qemu: snapshot: Add functions similar to disk source pool translation

2013-11-26 Thread Peter Krempa
To avoid future pain, add placeholder functions to get the actual snapshot disk type. --- src/qemu/qemu_conf.c | 23 +++ src/qemu/qemu_conf.h | 6 ++ 2 files changed, 29 insertions(+) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 639e2ff..210608e 100644

[libvirt] [PATCHv1.5 18/27] conf: Add functions to copy and free network disk source definitions

2013-11-26 Thread Peter Krempa
To simplify operations on virDomainDiskHostDef arrays we will need deep copy and freeing functions. Add and properly export them. --- src/conf/domain_conf.c | 55 +--- src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 2 ++ 3 files

[libvirt] [PATCHv1.5 19/27] qemu: snapshot: Detect internal snapshots also for sheepdog and RBD

2013-11-26 Thread Peter Krempa
When doing an internal snapshot on a VM with sheepdog or RBD disks we would not set a flag to mark the domain is using internal snapshots and might end up creating a mixed snapshot. Move the setting of the variable to avoid this problem. --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2

[libvirt] [PATCHv1.5 26/27] RFC: conf: snapshot: Parse more snapshot information

2013-11-26 Thread Peter Krempa
Add fields to hold information about network volumes for snapshots. RFC: Missing schema and tests. --- src/conf/snapshot_conf.c | 12 src/conf/snapshot_conf.h | 15 +-- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/conf/snapshot_conf.c

[libvirt] [PATCHv1.5 24/27] qemu: snapshots: Declare supported and unsupported snapshot configs

2013-11-26 Thread Peter Krempa
Currently the snapshot code did not check if it actually supports snapshots on various disk backends for domains. To avoid future problems add checkers that whitelist the supported configurations. --- src/qemu/qemu_driver.c | 264 +++-- 1 file changed,

[libvirt] [PATCHv1.5 27/27] RFC: qemu: snapshot: Add support for external active snapshots on gluster

2013-11-26 Thread Peter Krempa
This is a basic implementation of snapshots on gluster. Many things are lacking, especially cleanup after a failed snapshot. --- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_command.h | 9 src/qemu/qemu_driver.c | 106 3 files changed,

[libvirt] [PATCHv1.5 25/27] RFC: snapshot: Add support for specifying snapshot disk backing type

2013-11-26 Thread Peter Krempa
Add support for specifying various types when doing snapshots. This will later allow to do snapshots on network backed volumes. RFC: This patch is lacking tests and domain schema touch up. --- src/conf/snapshot_conf.c | 9 src/qemu/qemu_driver.c | 56

[libvirt] [PATCH python] Don't include virDomainSnapshotRef in python API

2013-11-26 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The reference counting API is for internal use only. Attempts to use it from python application code will cause havoc. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- generator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [libvirt] [PATCH v2 2/2] LXC: don't unmount mounts for shared root

2013-11-26 Thread Daniel P. Berrange
On Wed, Nov 20, 2013 at 10:11:09AM +0800, Gao feng wrote: Also after commit 5ff9d8a65ce80efb509ce4e8051394e9ed2cd942 vfs: Lock in place mounts from more privileged users, unprivileged user has no rights to umount the mounts that inherited from parent mountns. right now, I have no good

[libvirt] [PATCH python] Make block pull event dispatcher private

2013-11-26 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The method dispatchDomainEventBlockPullCallback which is used internally to dispatch block pull events to the python application code was missing the leading '_', to denote that it was private. All other event callback helpers have a leading '_'. No

[libvirt] [PATCH python] Avoid generating the migrate methods in multiple classes

2013-11-26 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The python code generator tries to figure out what class a method should be in by looking at the list of arguments for any which are object types. Unfortunately missing break statements meant that methods which have multiple object arguments (eg

Re: [libvirt] [PATCH] storage: don't read storage volumes in nonblock mode

2013-11-26 Thread Michal Privoznik
On 25.11.2013 22:49, Eric Blake wrote: Commit 348b4e2 introduced a potential problem (thankfully not in any release): we are attempting to use virFileReadHeaderFD() on a file that was opened with O_NONBLOCK. While this shouldn't be a problem in practice (because O_NONBLOCK typically doesn't

Re: [libvirt] [PATCHv1.5 06/27] qemu: Simplify call pattern of qemuBuildDriveURIString

2013-11-26 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: Automatically assign secret type from the disk source definition and pull in adding of the comma. Then update callers to keep generated output the same. --- src/qemu/qemu_command.c | 34 +- 1 file changed, 13

Re: [libvirt] [PATCHv1.5 07/27] qemu: Use qemuBuildNetworkDriveURI to handle http/ftp and friends

2013-11-26 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: Prepare the function to integrate other protocols and start folding other network protocols into a common place. --- src/qemu/qemu_command.c | 199 +--- 1 file changed, 122 insertions(+), 77 deletions(-)

Re: [libvirt] [PATCHv1.5 05/27] qemu: Split out formatting of network disk source URI

2013-11-26 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: The snapshot code will need to use qemu-style formatted URIs of network disks. Split out the code to avoid duplication. --- src/qemu/qemu_command.c | 146 src/qemu/qemu_command.h | 6 ++ 2 files

Re: [libvirt] [PATCHv1.5 03/27] qemuxml2argv: Add test to verify correct usage of disk type=volume

2013-11-26 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: Tweak the existing file to test command line generator too. --- tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.args | 8 tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml | 2 +- tests/qemuxml2argvtest.c

Re: [libvirt] [PATCHv1.5 01/27] conf: Export virStorageVolType enum helper functions

2013-11-26 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: Export string conversion from and to the virStorageVolType enum. --- src/libvirt_private.syms | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index a705c56..205fe56 100644 ---

Re: [libvirt] [PATCHv1.5 04/27] qemuxml2argv: Add test for disk type='volume' with iSCSI pools

2013-11-26 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: Tweak the existing file so that it can be tested for command line corectness. --- src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 + src/qemu/qemu_command.c

[libvirt] [PATCH python] Add missing binding of security model/label APIs

2013-11-26 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The virNodeGetSecurityModel, virDomainGetSecurityLabel and virDomainGetSecurityLabelList methods were disabled in the python binding for inexplicable reasons. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- generator.py | 6

Re: [libvirt] [PATCHv1.5 02/27] test: Implement fake storage pool driver in qemuxml2argv test

2013-11-26 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: To support testing of volume disk backing, we need to implement a few disk driver backend functions. The fake storage driver uses files in storagepoolxml2xmlout/POOLNAME.xml as XML files for pool definitions and volume names are in format

[libvirt] [PATCH python] Improve quality of sanitytest check

2013-11-26 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Validate that every public API method is mapped into the python and that every python method has a sane C API. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- sanitytest.py | 309 +++---

[libvirt] [libvirt-python] Call virGetLastError from mod rather than py wrapper

2013-11-26 Thread Doug Goldstein
All other code always calls the methods from the mod rather than using the python wrapper so this matches the state of all other callers. --- libvirt-override.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-override.py b/libvirt-override.py index ccfec48..87996f8

Re: [libvirt] [PATCH python] Improve quality of sanitytest check

2013-11-26 Thread Doug Goldstein
On Tue, Nov 26, 2013 at 12:32 PM, Daniel P. Berrange berra...@redhat.com wrote: From: Daniel P. Berrange berra...@redhat.com Validate that every public API method is mapped into the python and that every python method has a sane C API. Looks like we had the same idea and even a similar

Re: [libvirt] [PATCH python] Don't include virDomainSnapshotRef in python API

2013-11-26 Thread Eric Blake
On 11/26/2013 09:55 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The reference counting API is for internal use only. Attempts to use it from python application code will cause havoc. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- generator.py |

Re: [libvirt] [PATCH python] Make block pull event dispatcher private

2013-11-26 Thread Eric Blake
On 11/26/2013 09:57 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The method dispatchDomainEventBlockPullCallback which is used internally to dispatch block pull events to the python application code was missing the leading '_', to denote that it was private.

Re: [libvirt] [PATCH python] Avoid generating the migrate methods in multiple classes

2013-11-26 Thread Eric Blake
On 11/26/2013 10:00 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The python code generator tries to figure out what class a method should be in by looking at the list of arguments for any which are object types. Unfortunately missing break statements meant that

Re: [libvirt] [PATCH python] Add missing binding of security model/label APIs

2013-11-26 Thread Eric Blake
On 11/26/2013 11:32 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The virNodeGetSecurityModel, virDomainGetSecurityLabel and virDomainGetSecurityLabelList methods were disabled in the python binding for inexplicable reasons. Signed-off-by: Daniel P. Berrange

Re: [libvirt] [libvirt-python] Call virGetLastError from mod rather than py wrapper

2013-11-26 Thread Eric Blake
On 11/26/2013 12:00 PM, Doug Goldstein wrote: All other code always calls the methods from the mod rather than using the python wrapper so this matches the state of all other callers. --- libvirt-override.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK diff --git

Re: [libvirt] [RFC PATCH] libvirt support to force convergence of live guest migration

2013-11-26 Thread Chegu Vinod
On 11/26/2013 4:24 AM, Jiri Denemark wrote: On Thu, Nov 21, 2013 at 17:47:24 -0800, Chegu Vinod wrote: Busy enterprise workloads hosted on large sized VM's tend to dirty memory faster than the transfer rate achieved via live guest migration. Despite some good recent improvements ( using

Re: [libvirt] [PATCH] storage: don't read storage volumes in nonblock mode

2013-11-26 Thread Eric Blake
On 11/26/2013 10:19 AM, Michal Privoznik wrote: On 25.11.2013 22:49, Eric Blake wrote: Commit 348b4e2 introduced a potential problem (thankfully not in any release): we are attempting to use virFileReadHeaderFD() on a file that was opened with O_NONBLOCK. While this shouldn't be a problem in

[libvirt] [PATCH] look for numad in /usr/sbin

2013-11-26 Thread Jim Fehlig
When looking for numad with AC_PATH_PROG, include /usr/sbin in the search path. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4942e07..f494f46 100644 --- a/configure.ac +++ b/configure.ac @@ -1454,7 +1454,7 @@

[libvirt] [PATCH] Memory Leak Fix: Check def-info-alias before assigning

2013-11-26 Thread Nehal J Wani
On running the command make -C tests valgrind, there used to be a bunch of memory leaks shown by valgrind. Specifically, one can check it by running: libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=./.valgrind.supp qemuhotplugtest The issue was that def-info-alias was

[libvirt] virDomain{Attach, Detach, Update}DeviceFlags filesystem support for qemu driver

2013-11-26 Thread Jesse Cook
It does not currently appear to be possible to attach/detach a filesystem with kvm through the C API or virsh. Looking at src/qemu/qemu_driver.c:qemuDomain{Attach,Detach,Update}Config, VIR_DOMAIN_DEVICE_FS is not a case within the switch statement for dev-type. Is support for this planned for the

[libvirt] [test-API][PATCH V2] Add blockjob related test functions and cases

2013-11-26 Thread Jincheng Miao
* repos/domain/blkstatsflags.py * repos/domain/block_iotune.py * repos/domain/block_peek.py * repos/domain/block_resize.py * repos/domain/domain_blkio.py * cases/basic_blockjob.conf V1-V2: Removed diskpath params for block_resize, this hard code disk device is not convenient for

[libvirt] [test-API][PATCH V2] Modify previous test cases by invoking api

2013-11-26 Thread Jincheng Miao
* repos/domain/blkstats.py * repos/domain/domain_blkinfo.py Function blkstats and domain_blkinfo used virsh commands to test result, that is not fit for testing api, so I replace commands with invoking api. V1-V2: Removed blockdev params for domain_blkinfo, this hard code disk device

Re: [libvirt] [PATCH] look for numad in /usr/sbin

2013-11-26 Thread Eric Blake
On 11/26/2013 03:00 PM, Jim Fehlig wrote: When looking for numad with AC_PATH_PROG, include /usr/sbin in the search path. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK. diff --git a/configure.ac b/configure.ac index 4942e07..f494f46 100644 ---

[libvirt] [PATCH] storage: skip selinux cleanup when fd not available

2013-11-26 Thread Eric Blake
When attempting to backport gluster pools to an older version where there is no VIR_STRDUP, I got a crash from calling strdup(,NULL). Rather than relying on the current else branch safely doing nothing when there is no fd, it is easier to just skip it. While at it, there's no need to explicitly

Re: [libvirt] [PATCH] look for numad in /usr/sbin

2013-11-26 Thread Jim Fehlig
Eric Blake wrote: On 11/26/2013 03:00 PM, Jim Fehlig wrote: When looking for numad with AC_PATH_PROG, include /usr/sbin in the search path. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK. Thanks, pushed. Regards, Jim -- libvir-list mailing list

Re: [libvirt] [libvirt-test-API][PATCH] Fix utils.exec_cmd output problem

2013-11-26 Thread Guannan Ren
On 2013年11月26日 17:17, Jincheng Miao wrote: Thanks for review, yes, I missed this situation: stdout is not the subprocess.PIPE. Since the stderr is always subprocess.PIPE, my another way is err after Popen.communicate(). The patch looks like: --- utils/utils.py | 2 ++--- 1 file changed, 2

Re: [libvirt] [libvirt-test-API][PATCH] Fix utils.exec_cmd output problem

2013-11-26 Thread Jincheng Miao
- Original Message - Why to append standard error to standard output. It is not right in semantics. I think test-api should replace all commands modules with utils.exec_cmd. For commands modules, it merged stderr with stdout: def getstatusoutput(cmd): Return (status, output) of

Re: [libvirt] [PATCH] Memory Leak Fix: Check def-info-alias before assigning

2013-11-26 Thread Osier Yang
On 27/11/13 06:31, Nehal J Wani wrote: On running the command make -C tests valgrind, there used to be a bunch of memory leaks shown by valgrind. Specifically, one can check it by running: libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=./.valgrind.supp qemuhotplugtest

Re: [libvirt] [libvirt-test-API][PATCH] Fix utils.exec_cmd output problem

2013-11-26 Thread Guannan Ren
On 2013年11月27日 14:11, Jincheng Miao wrote: - Original Message - Why to append standard error to standard output. It is not right in semantics. I think test-api should replace all commands modules with utils.exec_cmd. For commands modules, it merged stderr with stdout: def

Re: [libvirt] [PATCH] storage: skip selinux cleanup when fd not available

2013-11-26 Thread Osier Yang
On 27/11/13 12:00, Eric Blake wrote: When attempting to backport gluster pools to an older version where there is no VIR_STRDUP, I got a crash from calling strdup(,NULL). Rather than relying on the current else branch safely doing nothing when there is no fd, it is easier to just skip it. While

[libvirt] [PATCH] libvirt-perl: Fix the wrong binding of virNodeDeviceLookupSCSIHostByWWN

2013-11-26 Thread Osier Yang
The second parameter for virNodeDeviceLookupSCSIHostByWWN is wwnn instead of wwpn, and the API supports flags. --- AUTHORS| 1 + lib/Sys/Virt/NodeDevice.pm | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index d53f191..c2af49a 100644

Re: [libvirt] [PATCHv1.5 02/27] test: Implement fake storage pool driver in qemuxml2argv test

2013-11-26 Thread Osier Yang
On 27/11/13 00:48, Peter Krempa wrote: To support testing of volume disk backing, we need to implement a few disk driver backend functions. The fake storage driver uses files in storagepoolxml2xmlout/POOLNAME.xml as XML files for pool definitions and volume names are in format