[libvirt] [v9 4/6] change lxc driver to use hostdev common library

2014-01-09 Thread Chunyan Liu
Change lxc driver to use hostdev common library instead of APIs in lxc_hostdev.[ch] Signed-off-by: Chunyan Liu cy...@suse.com --- po/POTFILES.in|1 - src/Makefile.am |1 - src/lxc/lxc_conf.h|4 - src/lxc/lxc_driver.c | 47 --- src/lxc/lxc_hostdev.c | 416

[libvirt] [v9 6/6] add pci passthrough to libxl driver

2014-01-09 Thread Chunyan Liu
Add pci passthrough to libxl driver, support attach-device, detach-device and start a vm with pci hostdev specified. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_conf.c | 63 +++ src/libxl/libxl_conf.h |4 + src/libxl/libxl_driver.c | 448

[libvirt] [v9 0/6] Write separate module for hostdev passthrough

2014-01-09 Thread Chunyan Liu
These patches implements a separate module for hostdev passthrough so that it could be shared by different drivers and can maintain a global state of a host device. patch 1/6: extract hostdev passthrough function from qemu_hostdev.c and make it reusable by multiple drivers. patch 2/6: add a unit

[libvirt] [v9 5/6] add hostdev pci backend type for xen

2014-01-09 Thread Chunyan Liu
Add VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN. For legacy xen, it will use pciback as stub driver. Signed-off-by: Chunyan Liu cy...@suse.com --- docs/schemas/domaincommon.rng |1 + src/conf/domain_conf.c|3 ++- src/conf/domain_conf.h|1 + src/libxl/libxl_domain.c |9

[libvirt] [v9 2/6] add unit test for hostdev common library

2014-01-09 Thread Chunyan Liu
Add unit test for hostdev common library. Current tests are based on virpcimock. Signed-off-by: Chunyan Liu cy...@suse.com --- tests/Makefile.am |5 + tests/virhostdevtest.c | 481 tests/virpcimock.c | 23 +++- 3 files changed, 508

Re: [libvirt] [PATCHv2 6/7] lxc: add virProcessRunInMountNamespace

2014-01-09 Thread Guido Günther
On Wed, Jan 08, 2014 at 12:26:41PM -0700, Eric Blake wrote: On 01/08/2014 12:10 PM, Guido Günther wrote: On Mon, Dec 23, 2013 at 10:55:50PM -0700, Eric Blake wrote: [..snip..] +if (virAsprintf(path, /proc/%llu/ns/mnt, (unsigned long long)pid) 0) +goto cleanup; + +

[libvirt] [PATCH 0/2] Try to get rid of most monitor timeout errors

2014-01-09 Thread Martin Kletzander
This is basically v3 of the patch Pavel Fux sent [1] with the addition of changing the default as discussed in the same thread [2]. Martin [1] https://www.redhat.com/archives/libvir-list/2014-January/msg00060.html [2] https://www.redhat.com/archives/libvir-list/2014-January/msg00367.html Martin

[libvirt] [PATCH 1/2] qemu: Add support for changing timeout value to open unix monitor socket

2014-01-09 Thread Martin Kletzander
From: Pavel Fux pa...@stratoscale.com Adding an option to change monitor socket opening timeout the current default is 3 seconds and in some cases it's not enough Signed-off-by: Pavel Fux pa...@stratoscale.com Signed-off-by: Martin Kletzander mklet...@redhat.com --- Notes: I modified the

[libvirt] [PATCH 2/2] qemu: Change the default unix monitor timeout

2014-01-09 Thread Martin Kletzander
There is a number of reported issues when we fail starting a domain. Turns out that, in some scenarios like high load, 3 second timeout is not enough for qemu to start up to the phase where the socket is created. Since the timeout is configurable and there is no downside of waiting longer, raise

Re: [libvirt] [PATCH] Add Documentation fields to systemd service files

2014-01-09 Thread Guido Günther
On Wed, Jan 08, 2014 at 12:39:05PM -0700, Eric Blake wrote: On 01/08/2014 12:29 PM, Guido Günther wrote: We point to the manpages where available and redirect to libvirt's homepage as a last resort. --- daemon/libvirtd.service.in | 2 ++ src/locking/virtlockd.service.in | 2 ++

Re: [libvirt] [PATCH RESEND] qemuBuildNicDevStr: Set vectors= on Multiqueue

2014-01-09 Thread Laine Stump
On 01/08/2014 04:22 PM, Michal Privoznik wrote: Yet another advice appeared on the Multiqueue wiki page: http://www.linux-kvm.org/page/Multiqueue#Enable_MQ_feature We should add vectors=N onto the qemu command line, where N = 2 * (number of queues) + 1. Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH 2/2] spice: expose the QEMU disable file transfer option

2014-01-09 Thread Christophe Fergeau
On Tue, Jan 07, 2014 at 08:04:33PM +0100, Francesco Romani wrote: spice-server offers an API to disable file transfer messages on the agent channel between the client and the guest. This is supported in qemu through the disable-agent-file-xfer option. This patch exposes this option to

Re: [libvirt] [PATCH 1/2] spice: detect if qemu can disable file transfer

2014-01-09 Thread Christophe Fergeau
On Tue, Jan 07, 2014 at 08:04:32PM +0100, Francesco Romani wrote: spice-server offers an API to disable file transfer messages on the agent channel between the client and the guest. This is supported in qemu through the disable-agent-file-xfer option. Looks good to me, ACK. Christophe

[libvirt] [libvirt-java] [PATCH 05/15] Remove processError from Interface class

2014-01-09 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. --- src/main/java/org/libvirt/Interface.java | 43 1 file changed, 11

[libvirt] [libvirt-java] [PATCH 01/15] Start refactoring of error handling

2014-01-09 Thread Claudio Bley
Almost every class contains a processError() method with an identical definition, just forwarding the call to ErrorHandler.processError(Libvirt). This function is always called after a libvirt function call (as per its javadoc comment). But, actually, there's no use in always calling

[libvirt] [libvirt-java] [PATCH 03/15] Remove processError from Domain class

2014-01-09 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also update erroneous javadoc comments stating that methods would return a value in case an error occurs. In case of a libvirt error, a LibvirtException is thrown. Add processErrorIfZero(long) to ErrorHandler class

[libvirt] [libvirt-java] [PATCH 04/15] Remove processError from DomainSnapshot class

2014-01-09 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error happens. --- src/main/java/org/libvirt/DomainSnapshot.java | 23 ++- 1 file changed, 6 insertions(+),

[libvirt] [libvirt-java] [PATCH 02/15] Remove processError from Device class

2014-01-09 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). --- Note, that this patch depends on another patch[1] still awaiting review. [1] http://www.redhat.com/archives/libvir-list/2014-January/msg00397.html src/main/java/org/libvirt/Device.java | 49

[libvirt] [libvirt-java] [PATCH 00/15] Refactor error handling

2014-01-09 Thread Claudio Bley
The error handling in libvirt-java is sort of a mess. Each and every class contains a processError() method which just forwards to ErrorHandler.processError(jna.Libvirt). Furthermore, this processError() method is often called unnecessarily after every libvirt call, although its return code did

[libvirt] [libvirt-java] [PATCH 06/15] Remove processError method from Network class

2014-01-09 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. --- src/main/java/org/libvirt/Network.java | 61 ++ 1 file changed, 17

[libvirt] [libvirt-java] [PATCH 10/15] Remove processError method from StorageVol class

2014-01-09 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. --- src/main/java/org/libvirt/StorageVol.java | 56 +-- 1 file changed, 16

[libvirt] [libvirt-java] [PATCH 11/15] Remove processError method from Stream class

2014-01-09 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. --- src/main/java/org/libvirt/Stream.java | 64 +++ 1 file changed, 20

[libvirt] [libvirt-java] [PATCH 13/15] Call processError only when virInitialize signalled an error

2014-01-09 Thread Claudio Bley
--- src/main/java/org/libvirt/Library.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/libvirt/Library.java b/src/main/java/org/libvirt/Library.java index 33d3042..95c13cb 100644 --- a/src/main/java/org/libvirt/Library.java +++

[libvirt] [libvirt-java] [PATCH 12/15] Remove processError method from Connect class

2014-01-09 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..) and remove calls to the deprecated ErrorHandler.processError(Libvirt) method. Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. ---

[libvirt] [libvirt-java] [PATCH 14/15] Remove ErrorHandler.processError(Libvirt) method

2014-01-09 Thread Claudio Bley
It was deprecated and is no longer used. --- src/main/java/org/libvirt/ErrorHandler.java | 12 1 file changed, 12 deletions(-) diff --git a/src/main/java/org/libvirt/ErrorHandler.java b/src/main/java/org/libvirt/ErrorHandler.java index 01e25d6..c2e7337 100644 ---

[libvirt] [libvirt-java] [PATCH 08/15] Remove processError method from Secret class

2014-01-09 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. --- src/main/java/org/libvirt/Secret.java | 61 +-- 1 file changed, 16

[libvirt] [libvirt-java] [PATCH 07/15] Remove processError method from NetworkFilter class

2014-01-09 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. --- src/main/java/org/libvirt/NetworkFilter.java | 43 +++- 1 file changed, 10

[libvirt] [libvirt-java] [PATCH 09/15] Remove processError method from StoragePool class

2014-01-09 Thread Claudio Bley
Wrap any fallible libvirt function in a call to ErrorHandler.processError(..). Adjust the doc comment for storageVolLookupByName to indicate that it might return null. Also correct wrong javadoc comments stating that methods would return a value in case an error occurs. ---

[libvirt] [libvirt-java] [PATCH 15/15] fixup! Start refactoring of error handling

2014-01-09 Thread Claudio Bley
There's no compelling reason to keep the various processError overloads which were added just to ease refactoring. Consider this squashed in prior of pushing this series. --- src/main/java/org/libvirt/ErrorHandler.java | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff

Re: [libvirt] [libvirt-sandbox PATCH v3] Add filter support.

2014-01-09 Thread Christophe Fergeau
Hey, Wouldn't something like the patch below help to remove the code duplication in libvirt-sandbox-config-builder-{container,machine}.c ? Christophe From 0f17bab6c4d9ef495d24d534d4422ae6502cdb8b Mon Sep 17 00:00:00 2001 From: Christophe Fergeau cferg...@redhat.com Date: Thu, 9 Jan 2014

Re: [libvirt] [libvirt-sandbox PATCH v3] Add filter support.

2014-01-09 Thread Christophe Fergeau
Hey, Mostly looks good, see below a few small changes I'd squash in. The only functional change is the addition of missing calls to g_object_notify() in the various setters, and the renaming of GVirSandboxConfigFilterref::filter to GVirSandboxConfigFilterref::name to match the name of the setter,

Re: [libvirt] [PATCH 2/2] spice: expose the QEMU disable file transfer option

2014-01-09 Thread Francesco Romani
Hi, thanks for the review I'd use a wording similar to what is used for copypaste: File transfer functionality (via Spice agent) is set using the codefiletransfer/code element. It is enabled by default, and can be disabled by setting the codecopypaste/code property to codeno/code, or at

Re: [libvirt] [Users] libvirt migration port configuration and virPortAllocator

2014-01-09 Thread Ján Tomko
On 01/08/2014 05:48 PM, Eric Blake wrote: On 01/08/2014 02:45 AM, Dan Kenigsberg wrote: On Wed, Jan 08, 2014 at 01:26:23AM +0100, Gianluca Cecchi wrote: Hello, following the bugzilla here: https://bugzilla.redhat.com/show_bug.cgi?id=1019053 This bug was tagged against upstream libvirt. If

Re: [libvirt] [PATCH 17/24] maint: improve VIR_ERR_INVALID_STORAGE_VOL usage

2014-01-09 Thread Eric Blake
On 01/02/2014 05:28 PM, John Ferlan wrote: On 12/28/2013 11:11 AM, Eric Blake wrote: For storage volume validation, we weren't consistent on whether to use VIR_FROM_NONE or VIR_FROM_STORAGE. Similar to previous patches, use a common macro to make it nicer. virStorageVolCreateXMLFrom

[libvirt] [PATCH] storage: fix crash when listing volumes or undefining a pool

2014-01-09 Thread Martin Kletzander
The commit cad3cf9a951d26da9d2ee0f5b52fb1a2dbb74af1 introduced a crash due to wrong order of parameters being passed to the function. When deleting an element, the function decreased the iterator instead of count and if listing volumes after that (or undefining the pool, NULL was being

Re: [libvirt] [PATCH] storage: fix crash when listing volumes or undefining a pool

2014-01-09 Thread Eric Blake
On 01/09/2014 08:35 AM, Martin Kletzander wrote: The commit cad3cf9a951d26da9d2ee0f5b52fb1a2dbb74af1 introduced a crash due to wrong order of parameters being passed to the function. When deleting an element, the function decreased the iterator instead of count and if listing volumes after

Re: [libvirt] [PATCH] storage: fix crash when listing volumes or undefining a pool

2014-01-09 Thread Martin Kletzander
On Thu, Jan 09, 2014 at 08:41:11AM -0700, Eric Blake wrote: On 01/09/2014 08:35 AM, Martin Kletzander wrote: The commit cad3cf9a951d26da9d2ee0f5b52fb1a2dbb74af1 introduced a crash due to wrong order of parameters being passed to the function. When deleting an element, the function

[libvirt] [Ruby]How to retrieve nodes in devices ?

2014-01-09 Thread Teto
Hi, I would like to list devices (for instance I would like to retrieve the filesystem part in devicesfilesystem type=mount.../filesystem/devices) embedded in a domain via the ruby bindings ? Thanks Matt -- libvir-list mailing list libvir-list@redhat.com

[libvirt] /var/lib/libvirt/qemu permissions are wrong

2014-01-09 Thread Marcelo Cerri
Hi, Any directions regarding which is the best approach to correct the bug reported in https://bugzilla.redhat.com/show_bug.cgi?id=1045040 ? Regards, Marcelo -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 05/10] snapshot: Add support for specifying snapshot disk backing type

2014-01-09 Thread Peter Krempa
Add support for specifying various types when doing snapshots. This will later allow to do snapshots on network backed volumes. Disks of type 'volume' are not supported by snapshots (yet). --- docs/formatsnapshot.html.in | 15 docs/schemas/domainsnapshot.rng | 76

[libvirt] [PATCH 07/10] storage: Implement ephemeral storage APIs for local disk volumes

2014-01-09 Thread Peter Krempa
This patch implements the APIs for getting temporary storage pools for the local filesystem driver using storage_backend_fs. --- src/check-aclrules.pl| 3 + src/storage/storage_driver.c | 253 +++ 2 files changed, 256 insertions(+) diff --git

[libvirt] [PATCH 10/10] qemu: snapshot: Add support for external active snapshots on gluster

2014-01-09 Thread Peter Krempa
Add support for gluster backed images as sources for snapshots in the qemu driver. This will also simplify adding further network backed volumes as sources for snapshot in case qemu will support them. --- docs/formatsnapshot.html.in | 4 +- src/qemu/qemu_command.c | 2 +-

[libvirt] [PATCH 03/10] storage: gluster: Introduce dummy functions for creating a volume

2014-01-09 Thread Peter Krempa
The temporary pool code will need to initialize dummy gluster volumes which needs the createVol function of the storage backend. This patch implements it only for that purpose. When an user will get an error message that it is not implemented on an attempt to create a volume in a gluster pool. ---

[libvirt] [PATCH 00/10] Snapshots on gluster volumes

2014-01-09 Thread Peter Krempa
This series has to be applied on top of http://www.redhat.com/archives/libvir-list/2014-January/msg00192.html Peter Krempa (10): storage: Introduce internal pool support storage: Add new argument for createVol backend API storage: gluster: Introduce dummy functions for creating a volume

[libvirt] [PATCH 08/10] storage: gluster: Support conversion of gluster volumes to temp volumes

2014-01-09 Thread Peter Krempa
Add code to convert an regular guest volume into a ephemeral pool. --- src/storage/storage_driver.c | 153 ++- 1 file changed, 150 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 5927ebf..9b1aa9c

[libvirt] [PATCH 06/10] snapshot: Test snapshot disk type specification

2014-01-09 Thread Peter Krempa
Amend tests to check parsing of the various new disk types that can now be specified. --- tests/domainsnapshotxml2xmlin/disk_snapshot.xml | 18 ++ tests/domainsnapshotxml2xmlout/disk_snapshot.xml | 18 ++ 2 files changed, 36 insertions(+) diff --git

[libvirt] [PATCH 09/10] qemu: snapshot: Switch snapshot file deletion to the new storage API

2014-01-09 Thread Peter Krempa
Use the new storage conversion APIs to delete garbage left behind after a failed snapshot attempt using the storage driver. --- src/qemu/qemu_driver.c | 60 ++ 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 04/10] storage: Add internal API to create temporary storage pools and vols

2014-01-09 Thread Peter Krempa
If a VM driver wants to access stuff provided by a storage driver the volume needs to be a part of a storage pool. As this wasn't designed in from the beginning we need a way to convert generic domain disk and snapshot disk definitions into temporary pools and volumes. This patch allows that by

[libvirt] [PATCH 01/10] storage: Introduce internal pool support

2014-01-09 Thread Peter Krempa
To allow using the storage driver APIs to do operation on generic domain disks we will need to introduce internal storage pools that will give is a base to support this stuff even on files that weren't originally defined as a part of the pool. This patch introduces the 'internal' flag for a

[libvirt] [PATCH 02/10] storage: Add new argument for createVol backend API

2014-01-09 Thread Peter Krempa
--- src/storage/storage_backend.h | 2 +- src/storage/storage_backend_disk.c | 3 ++- src/storage/storage_backend_fs.c | 30 +++--- src/storage/storage_backend_logical.c | 6 -- src/storage/storage_backend_rbd.c | 3 ++-

Re: [libvirt] /var/lib/libvirt/qemu permissions are wrong

2014-01-09 Thread Richard W.M. Jones
On Thu, Jan 09, 2014 at 02:12:20PM -0200, Marcelo Cerri wrote: Hi, Any directions regarding which is the best approach to correct the bug reported in https://bugzilla.redhat.com/show_bug.cgi?id=1045040 ? [This is a copy of the comment I added to that bug] libvirt currently creates the

Re: [libvirt] Entering freeze for 1.2.1

2014-01-09 Thread Guido Günther
On Wed, Jan 08, 2014 at 12:04:28PM +0800, Daniel Veillard wrote: As planned, I just tagged Release Candidate 1 for libvirt and libvirt-python in git and pushed tarballs to the usual places: ftp://libvirt.org/libvirt ftp://libvirt.org/libvirt/python I think I will make a release

Re: [libvirt] [PATCH 18/24] maint: improve VIR_ERR_INVALID_NODE_DEVICE usage

2014-01-09 Thread Eric Blake
On 01/02/2014 05:30 PM, John Ferlan wrote: On 12/28/2013 11:11 AM, Eric Blake wrote: While all errors related to invalid node device appeared to be consistent, we might as well continue the trend of using a common macro. For now, we don't need virCheckNodeDeviceGoto(). * src/datatypes.h

Re: [libvirt] [Ruby]How to retrieve nodes in devices ?

2014-01-09 Thread Chris Lalancette
On Thu, Jan 9, 2014 at 11:04 AM, Teto matta...@gmail.com wrote: Hi, I would like to list devices (for instance I would like to retrieve the filesystem part in devicesfilesystem type=mount.../filesystem/devices) embedded in a domain via the ruby bindings ? The steps are roughly: 1. require

Re: [libvirt] [PATCH 19/24] maint: improve VIR_ERR_INVALID_SECRET usage

2014-01-09 Thread Eric Blake
On 01/02/2014 05:36 PM, John Ferlan wrote: On 12/28/2013 11:11 AM, Eric Blake wrote: While all errors related to invalid secrets appeared to be consistent, we might as well continue the trend of using a common macro. For now, we don't need virCheckSecretGoto(). * src/datatypes.h

Re: [libvirt] [PATCH 2/8] storage: Support deletion of volumes on gluster pools

2014-01-09 Thread Eric Blake
On 01/06/2014 09:44 AM, Peter Krempa wrote: Implement the deleteVol storage backend function for gluster volumes. --- src/storage/storage_backend_gluster.c | 64 +++ 1 file changed, 64 insertions(+) ACK, but this starts to get into feature addition, so I'm

Re: [libvirt] [PATCH 1/8] storage: fs: Fix comment for virStorageBackendFileSystemDelete

2014-01-09 Thread Eric Blake
On 01/06/2014 09:44 AM, Peter Krempa wrote: The comment was talking about creating the pool while the function is deleting it. Fix the mismatch. --- src/storage/storage_backend_fs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) ACK, safe for 1.2.1 diff --git

Re: [libvirt] [PATCH 20/24] maint: improve VIR_ERR_INVALID_STREAM usage

2014-01-09 Thread Eric Blake
On 01/02/2014 05:51 PM, John Ferlan wrote: On 12/28/2013 11:11 AM, Eric Blake wrote: For streams validation, we weren't consistent on whether to use VIR_FROM_NONE or VIR_FROM_STREAMS. Furthermore, in many API, we want to ensure that a stream is tied to the same connection as the other

Re: [libvirt] [PATCH 22/24] maint: improve VIR_ERR_INVALID_DOMAIN_SNAPSHOT usage

2014-01-09 Thread Eric Blake
On 01/02/2014 06:38 PM, John Ferlan wrote: On 01/02/2014 07:53 PM, John Ferlan wrote: On 12/28/2013 11:11 AM, Eric Blake wrote: The existing check of domain snapshots validated that they point to a domain, but did not validate that the domain points to a connection, even though any

Re: [libvirt] [PATCH 22/24] maint: improve VIR_ERR_INVALID_DOMAIN_SNAPSHOT usage

2014-01-09 Thread Eric Blake
On 01/02/2014 05:55 PM, John Ferlan wrote: On 12/28/2013 11:11 AM, Eric Blake wrote: The existing check of domain snapshots validated that they point to a domain, but did not validate that the domain points to a connection, even though any errors blindly assume the connection is valid.

Re: [libvirt] [PATCH 23/24] maint: clean up error reporting in migration

2014-01-09 Thread Eric Blake
On 01/02/2014 06:57 PM, John Ferlan wrote: On 12/28/2013 11:11 AM, Eric Blake wrote: While auditing the error reporting, I noticed that migration had some issues. Some of the static helper functions tried to call virDispatchError(), even though their caller will also report the error.

Re: [libvirt] CVE-2013-6456 Re: [PATCHv2 0/7] lxc: honor mount namespaces

2014-01-09 Thread Eric Blake
On 01/07/2014 06:32 PM, Gao feng wrote: On 01/07/2014 12:18 PM, Eric Blake wrote: On 12/24/2013 06:45 AM, Reco wrote: On Tue, 24 Dec 2013 06:29:11 -0700 Eric Blake ebl...@redhat.com wrote: diff --git i/src/util/virprocess.c w/src/util/virprocess.c index c99b75a..e069483 100644 ---

Re: [libvirt] [PATCH 3/8] storage: lvm: Avoid forward decl of virStorageBackendLogicalDeleteVol

2014-01-09 Thread Eric Blake
On 01/06/2014 09:44 AM, Peter Krempa wrote: Change code ordering to avoid the need for a forward declaration. --- src/storage/storage_backend_logical.c | 67 --- 1 file changed, 31 insertions(+), 36 deletions(-) ACK; fairly mechanical. This one is safe for

Re: [libvirt] [PATCH 4/8] storage: lvm: Separate creating of the volume from building

2014-01-09 Thread Eric Blake
On 01/06/2014 09:44 AM, Peter Krempa wrote: Separate the steps to create libvirt's volume metadata from the actual volume building process. This is already done for regular file based pools to allow job support for storage APIs. --- src/storage/storage_backend_logical.c | 60

Re: [libvirt] [PATCH 5/8] storage: disk: Separate creating of the volume from building

2014-01-09 Thread Eric Blake
On 01/06/2014 09:44 AM, Peter Krempa wrote: Separate the steps to create libvirt's volume metadata from the actual volume building process. --- src/storage/storage_backend_disk.c | 44 ++ 1 file changed, 30 insertions(+), 14 deletions(-) ACK, same

Re: [libvirt] [PATCH 6/8] storage: RBD: Separate creating of the volume from building

2014-01-09 Thread Eric Blake
On 01/06/2014 09:44 AM, Peter Krempa wrote: Separate the steps to create libvirt's volume metadata from the actual volume building process. --- src/storage/storage_backend_rbd.c | 41 --- 1 file changed, 34 insertions(+), 7 deletions(-) Same as 4/8 on

Re: [libvirt] [PATCH 7/8] storage: Sheepdog: Separate creating of the volume from building

2014-01-09 Thread Eric Blake
On 01/06/2014 09:44 AM, Peter Krempa wrote: Separate the steps to create libvirt's volume metadata from the actual volume building process. --- src/storage/storage_backend_sheepdog.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) ACK; same as 4/8 on

Re: [libvirt] [PATCH 8/8] storage: Improve error message when a storage backend is missing

2014-01-09 Thread Eric Blake
On 01/06/2014 09:44 AM, Peter Krempa wrote: Include the name of the storage backend in the error message instead of just the number. --- src/storage/storage_backend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ACK; this one is okay for 1.2.1. -- Eric Blake eblake redhat com

Re: [libvirt] [PATCH 01/10] storage: Introduce internal pool support

2014-01-09 Thread Eric Blake
On 01/09/2014 09:15 AM, Peter Krempa wrote: To allow using the storage driver APIs to do operation on generic domain disks we will need to introduce internal storage pools that will give is a base to support this stuff even on files that weren't originally defined as a part of the pool.

Re: [libvirt] [PATCH 02/10] storage: Add new argument for createVol backend API

2014-01-09 Thread Eric Blake
On 01/09/2014 09:15 AM, Peter Krempa wrote: --- A little sparse on the intent of the new flag... src/storage/storage_backend.h | 2 +- src/storage/storage_backend_disk.c | 3 ++- src/storage/storage_backend_fs.c | 30 +++---

Re: [libvirt] [PATCH 03/10] storage: gluster: Introduce dummy functions for creating a volume

2014-01-09 Thread Eric Blake
On 01/09/2014 09:15 AM, Peter Krempa wrote: The temporary pool code will need to initialize dummy gluster volumes which needs the createVol function of the storage backend. This patch implements it only for that purpose. When an user will get an error s/When an user/A user/ message that it

Re: [libvirt] [PATCH 04/10] storage: Add internal API to create temporary storage pools and vols

2014-01-09 Thread Eric Blake
On 01/09/2014 09:15 AM, Peter Krempa wrote: If a VM driver wants to access stuff provided by a storage driver the volume needs to be a part of a storage pool. As this wasn't designed in from the beginning we need a way to convert generic domain disk and snapshot disk definitions into temporary

Re: [libvirt] [PATCH 05/10] snapshot: Add support for specifying snapshot disk backing type

2014-01-09 Thread Eric Blake
On 01/09/2014 09:15 AM, Peter Krempa wrote: Add support for specifying various types when doing snapshots. This will later allow to do snapshots on network backed volumes. Disks of type 'volume' are not supported by snapshots (yet). --- docs/formatsnapshot.html.in | 15

Re: [libvirt] [PATCH 06/10] snapshot: Test snapshot disk type specification

2014-01-09 Thread Eric Blake
On 01/09/2014 09:15 AM, Peter Krempa wrote: Amend tests to check parsing of the various new disk types that can now be specified. --- tests/domainsnapshotxml2xmlin/disk_snapshot.xml | 18 ++ tests/domainsnapshotxml2xmlout/disk_snapshot.xml | 18 ++ 2 files

Re: [libvirt] [PATCH 07/10] storage: Implement ephemeral storage APIs for local disk volumes

2014-01-09 Thread Eric Blake
On 01/09/2014 09:15 AM, Peter Krempa wrote: This patch implements the APIs for getting temporary storage pools for the local filesystem driver using storage_backend_fs. --- src/check-aclrules.pl| 3 + src/storage/storage_driver.c | 253 +++

Re: [libvirt] [PATCH 08/10] storage: gluster: Support conversion of gluster volumes to temp volumes

2014-01-09 Thread Eric Blake
On 01/09/2014 09:15 AM, Peter Krempa wrote: Add code to convert an regular guest volume into a ephemeral pool. s/an regular/a regular/ + +if (VIR_STRDUP(volume, source) 0) +goto cleanup; + +if ((tmp = strchr(volume, '/'))) +*tmp++ = '0'; '0'? Don't you mean

Re: [libvirt] [PATCH 09/10] qemu: snapshot: Switch snapshot file deletion to the new storage API

2014-01-09 Thread Eric Blake
On 01/09/2014 09:15 AM, Peter Krempa wrote: Use the new storage conversion APIs to delete garbage left behind after a failed snapshot attempt using the storage driver. --- src/qemu/qemu_driver.c | 60 ++ 1 file changed, 46 insertions(+), 14

Re: [libvirt] [PATCH 10/10] qemu: snapshot: Add support for external active snapshots on gluster

2014-01-09 Thread Eric Blake
On 01/09/2014 09:15 AM, Peter Krempa wrote: Add support for gluster backed images as sources for snapshots in the qemu driver. This will also simplify adding further network backed volumes as sources for snapshot in case qemu will support them. --- docs/formatsnapshot.html.in | 4 +-

Re: [libvirt] [PATCH v2] lxcDomainShutdownFlags and lxcDomainReboot: Cleanup @flags usage

2014-01-09 Thread Eric Blake
On 01/07/2014 08:20 AM, Michal Privoznik wrote: Currently, the @flags usage is a bit unclear at first sight to say the least. There's no need for such unclear code especially when we can borrow the working code from qemuDomainShutdownFlags(). Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH v2] lxcDomainShutdownFlags and lxcDomainReboot: Cleanup @flags usage

2014-01-09 Thread Eric Blake
On 01/09/2014 05:12 PM, Eric Blake wrote: On 01/07/2014 08:20 AM, Michal Privoznik wrote: Currently, the @flags usage is a bit unclear at first sight to say the least. There's no need for such unclear code especially when we can borrow the working code from qemuDomainShutdownFlags(). Working,

[libvirt] processor info gotten from 'virsh sysinfo' does match proc-cpuinfo

2014-01-09 Thread yue
hi,all my environment is fc19, libvirt-1.0.5.8-1.fc19.x86_64 when systemctl start libvirtd.service , some warnning printed: Jan 09 17:53:01 localhost.localdomain libvirtd[12516]: libvirt version: 1.0.5.8, package: 1.fc19 (Fedora Project, 2013-12-14-21:10:58, buildv...ct.org) Jan 09 17:53:01

Re: [libvirt] [PATCHv2 6/7] lxc: add virProcessRunInMountNamespace

2014-01-09 Thread Eric Blake
On 12/23/2013 10:55 PM, Eric Blake wrote: Implement virProcessRunInMountNamespace, which runs callback of type virProcessNamespaceCallback in a container namespace. Idea by Dan Berrange, based on an initial report by Reco recovery...@gmail.com at

Re: [libvirt] [PATCH v4 4/7] Add network events to the remote driver

2014-01-09 Thread Eric Blake
On 12/12/2013 07:30 AM, Cedric Bosdonnat wrote: Hi John, +event = virNetworkEventLifecycleNew(net-name, net-uuid, msg-event); +virNetworkFree(net); +remoteDomainEventQueue(priv, event); Essentially - you need to check for NULL event. Sure, but the weird thing it that it

Re: [libvirt] [PATCH v4 4/7] Add network events to the remote driver

2014-01-09 Thread Eric Blake
On 01/09/2014 07:50 PM, Eric Blake wrote: On 12/12/2013 07:30 AM, Cedric Bosdonnat wrote: Hi John, +event = virNetworkEventLifecycleNew(net-name, net-uuid, msg-event); +virNetworkFree(net); +remoteDomainEventQueue(priv, event); Essentially - you need to check for NULL event.

[libvirt] [PATCH] event: don't queue NULL event on OOM

2014-01-09 Thread Eric Blake
Ever since commit 61ac8ce, Coverity complained about remoteNetworkBuildEventLifecycle not checking for NULL failure to build an event, compared to other calls in the code base. But the problem is latent from copy and paste; all 17 of our remote*BuildEvent* functions in remote_driver.c have the

Re: [libvirt] [PATCH] event: don't queue NULL event on OOM

2014-01-09 Thread John Ferlan
On 01/09/2014 10:22 PM, Eric Blake wrote: Ever since commit 61ac8ce, Coverity complained about remoteNetworkBuildEventLifecycle not checking for NULL failure to build an event, compared to other calls in the code base. But the problem is latent from copy and paste; all 17 of our

Re: [libvirt] [PATCH] event: don't queue NULL event on OOM

2014-01-09 Thread Eric Blake
On 01/09/2014 08:25 PM, John Ferlan wrote: On 01/09/2014 10:22 PM, Eric Blake wrote: Ever since commit 61ac8ce, Coverity complained about remoteNetworkBuildEventLifecycle not checking for NULL failure to build an event, compared to other calls in the code base. I don't know if this will

Re: [libvirt] [PATCH] Clarify documentation on possible return values in case of errors

2014-01-09 Thread Guido Günther
On Thu, Jan 09, 2014 at 08:07:25AM +0100, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- src/libvirt.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index ffd4f8e..73972f2 100644 --- a/src/libvirt.c