Re: [libvirt] [PATCH 10/14] Introduce virDomainMigrate*CompressionCache APIs

2013-02-22 Thread Peter Krempa
On 02/19/13 13:35, Jiri Denemark wrote: Introduce virDomainMigrateGetCompressionCache and virDomainMigrateSetCompressionCache APIs. --- include/libvirt/libvirt.h.in | 7 +++ python/generator.py | 1 + src/driver.h | 11 + src/libvirt.c| 100

Re: [libvirt] [PATCH 11/14] python: Implement virDomainMigrateGetCompressionCache wrapper

2013-02-22 Thread Peter Krempa
On 02/19/13 13:35, Jiri Denemark wrote: --- python/libvirt-override-api.xml | 7 +++ python/libvirt-override.c | 28 2 files changed, 35 insertions(+) diff --git a/python/libvirt-override-api.xml b/python/libvirt-override-api.xml index

Re: [libvirt] [PATCH 12/14] remote: Implement virDomainMigrate*CompressionCache

2013-02-22 Thread Peter Krempa
On 02/19/13 13:35, Jiri Denemark wrote: --- src/remote/remote_driver.c | 2 ++ src/remote/remote_protocol.x | 19 ++- src/remote_protocol-structs | 14 ++ 3 files changed, 34 insertions(+), 1 deletion(-) Straightforward. ACK. Peter -- libvir-list mailing

Re: [libvirt] [PATCH 13/14] virsh: Add migrate-compcache command

2013-02-22 Thread Peter Krempa
On 02/19/13 13:35, Jiri Denemark wrote: This is a command wrapping virDomainMigrateGetCompressionCache and virDomainMigrateSetCompressionCache. --- tools/virsh-domain.c | 68 tools/virsh.pod | 12 ++ 2 files changed, 80

Re: [libvirt] [PATCH 1/2] conf: Don't leak 'primary' video property on error

2013-02-22 Thread Christophe Fergeau
On Thu, Feb 21, 2013 at 01:07:27PM -0700, Eric Blake wrote: On 02/21/2013 08:49 AM, Christophe Fergeau wrote: It's only freed on normal returns from virDomainVideoDefParseXML, but not when erroring out. --- src/conf/domain_conf.c | 5 +++-- 1 file changed, 3 insertions(+), 2

Re: [libvirt] [PATCH 14/14] qemu: Implement virDomainMigrate*CompressionCache

2013-02-22 Thread Peter Krempa
On 02/19/13 13:35, Jiri Denemark wrote: --- src/qemu/qemu_driver.c | 94 src/qemu/qemu_monitor.c | 43 src/qemu/qemu_monitor.h | 5 +++ src/qemu/qemu_monitor_json.c | 63 +

[libvirt] [PATCHv2 1/1] Optimize machine option to set more options with it.

2013-02-22 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com Currently, -machine option is used only when dump-guest-core is used. To use options defined in machine option for new version of QEMU, it needs to use -machine xxx, and to be compatible with older version -M, this patch addes QEMU_CAPS_MACH_OPT

[libvirt] [PATCH 1/1] Add NVRAM device

2013-02-22 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device. Users are allowed to specify spapr-vio devices'address. But NVRAM is not supported in libvirt. So this patch is to add NVRAM device to allow users to specify its address. In QEMU, NVRAM

[libvirt] The console can't capture user's input. Is it readonly or read/write?

2013-02-22 Thread Yin Olivia-R63875
Hi Daniel, Since there's no machine serial port for FSL PowerPC board, I just use '-serial' option for ppc architecture. libvirt-0.10.1/src/qemu/qemu_command.c: @@ -5491,7 +5491,8 @@ /* Use -chardev with -device if they are available */ if (qemuCapsGet(qemuCaps,

Re: [libvirt] [PATCH RESEND] Add support for option tag in network config

2013-02-22 Thread Michal Privoznik
On 21.02.2013 23:40, Pieter Hollants wrote: This patch adds support for a new option-Tag in the dhcp block of network configs, based on a subset of the fifth proposal by Laine Stump in the mailing list discussion at https://www.redhat.com/archives/libvir-list/2012-November/msg01054.html.

Re: [libvirt] [Qemu-devel] [PATCH] vl.c: Support multiple CPU ranges on -numa option

2013-02-22 Thread Markus Armbruster
Markus Armbruster arm...@redhat.com writes: Anthony Liguori anth...@codemonkey.ws writes: Markus Armbruster arm...@redhat.com writes: Eduardo Habkost ehabk...@redhat.com writes: This allows , to be used a separator between each CPU range. Note that commas inside key=value command-line

Re: [libvirt] [PATCH 01/14] Introduce VIR_MIGRATE_COMPRESSED flag

2013-02-22 Thread Daniel P. Berrange
On Thu, Feb 21, 2013 at 10:04:07PM +0100, Peter Krempa wrote: On 02/19/13 13:35, Jiri Denemark wrote: This flag may be used with migration APIs to request compression of migration data. --- include/libvirt/libvirt.h.in | 1 + tools/virsh-domain.c | 8 tools/virsh.pod

Re: [libvirt] [PATCH] qemu: Refactor qemuDomainSetMemoryParameters

2013-02-22 Thread John Ferlan
On 02/18/2013 10:18 AM, Peter Krempa wrote: The new TypedParam helper APIs allow to simplify this function significantly. This patch integrates the fix in 75e5bec97b3045e4f926248d5c742f8a50d0f9 by correctly ordering the setting functions instead of reordering the parameters. ---

Re: [libvirt] [PATCH v2 1/8] hellolibvirt: Update hellolibvirt example

2013-02-22 Thread John Ferlan
On 02/20/2013 08:05 PM, Dave Allan wrote: On Wed, Feb 20, 2013 at 12:38:38PM -0500, John Ferlan wrote: Update the code to be more in line with how code looks elsewhere in libvirt. Allow listing of domains, networks, storage pools, and network interfaces. I like the changes to make the

Re: [libvirt] [PATCH v4 0/9] Rework storage migration

2013-02-22 Thread Jiri Denemark
On Thu, Feb 21, 2013 at 14:39:17 +0100, Michal Privoznik wrote: Since there are many hidden problems with auto-creating storage for the domain in here, as previous rounds of reviewing the series has shown, I've decided to not do anything about it for now and the auto allocation is dropped

Re: [libvirt] [PATCH 1/5] storage: move flag setting after declarations

2013-02-22 Thread John Ferlan
On 02/18/2013 09:27 AM, Ján Tomko wrote: --- src/storage/storage_backend.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) ACK John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/5] storage: separate qemu-img command generation and execution

2013-02-22 Thread John Ferlan
On 02/18/2013 09:27 AM, Ján Tomko wrote: This allows us to create a test for the generated command line. --- src/storage/storage_backend.c | 98 ++- src/storage/storage_backend.h | 8 2 files changed, 67 insertions(+), 39 deletions(-) ACK

Re: [libvirt] [PATCH 3/5] storage: add test for qemu-img command line generation

2013-02-22 Thread John Ferlan
On 02/18/2013 09:27 AM, Ján Tomko wrote: --- tests/Makefile.am | 9 + tests/storagevolxml2argvdata/pool-dir.xml | 18 ++ tests/storagevolxml2argvdata/qcow2-flag.argv | 1 + .../qcow2-nobacking-convert-flag.argv | 1 +

Re: [libvirt] [PATCH 4/5] storage: move qemu-img options before positional arguments

2013-02-22 Thread John Ferlan
On 02/18/2013 09:27 AM, Ján Tomko wrote: Modify the expected output of storagevolxml2argv tests as well. --- src/storage/storage_backend.c | 21 ++--- tests/storagevolxml2argvdata/qcow2-flag.argv| 2 +- .../qcow2-nobacking-convert-flag.argv

Re: [libvirt] [PATCH 5/5] storage: qemu-img: change INFO to DEBUG

2013-02-22 Thread John Ferlan
On 02/18/2013 09:27 AM, Ján Tomko wrote: For really old qemu-img binaries which do not support specifying the format of the backing file, display a DEBUG message instead of INFO that this can't be done. --- src/storage/storage_backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [libvirt] [PATCH v4 1/9] qemu: Introduce NBD_SERVER capability

2013-02-22 Thread Jiri Denemark
On Thu, Feb 21, 2013 at 14:39:18 +0100, Michal Privoznik wrote: This just keeps track whether qemu knows nbd-server-* commands so we can use it during migration or not. --- src/qemu/qemu_capabilities.c | 4 +++- src/qemu/qemu_capabilities.h | 1 + 2 files changed, 4 insertions(+), 1

Re: [libvirt] [PATCH 10/14] Introduce virDomainMigrate*CompressionCache APIs

2013-02-22 Thread Daniel P. Berrange
On Fri, Feb 22, 2013 at 09:06:42AM +0100, Peter Krempa wrote: On 02/19/13 13:35, Jiri Denemark wrote: Introduce virDomainMigrateGetCompressionCache and virDomainMigrateSetCompressionCache APIs. --- include/libvirt/libvirt.h.in | 7 +++ python/generator.py | 1 +

Re: [libvirt] [PATCH 2/2] qemu: allow multiple buses in PCI address alocation

2013-02-22 Thread Ján Tomko
On 02/21/13 17:12, Laine Stump wrote: On 02/15/2013 03:22 AM, Ján Tomko wrote: Allow allocating addresses with non-zero bus numbers. while not actually allowing it :-) (since maxbus is never set to anything 0, as you say in Patch 0/2). How/when do you envision that being changed? liguang's

Re: [libvirt] [PATCH] docs: Add detailed notes snapshots, blockcommit, blockpull

2013-02-22 Thread Christophe Fergeau
Hey Kashyap, I've started reading this to learn about libvirt snapshot implementation, and noticed a few typos (I think Eric already pointed out some of these), On Tue, Oct 23, 2012 at 03:28:06PM +0530, Kashyap Chamarthy wrote: --- docs/snapshots-blockcommit-blockpull.rst | 646

[libvirt] Libvirt java build problems

2013-02-22 Thread Daniel P. Berrange
The Fedora build of libvirt-java is currently broken with a strange error: http://kojipkgs.fedoraproject.org//work/tasks/4719/4994719/build.log Buildfile: /builddir/build/BUILD/libvirt-java-0.4.9/build.xml init: [mkdir] Created dir: /builddir/build/BUILD/libvirt-java-0.4.9/target/classes

Re: [libvirt] Libvirt java build problems

2013-02-22 Thread Claudio Bley
At Fri, 22 Feb 2013 15:20:03 +, Daniel P. Berrange wrote: The Fedora build of libvirt-java is currently broken with a strange error: http://kojipkgs.fedoraproject.org//work/tasks/4719/4994719/build.log Buildfile: /builddir/build/BUILD/libvirt-java-0.4.9/build.xml init:

Re: [libvirt] Libvirt java build problems

2013-02-22 Thread Daniel P. Berrange
On Fri, Feb 22, 2013 at 04:34:19PM +0100, Claudio Bley wrote: At Fri, 22 Feb 2013 15:20:03 +, Daniel P. Berrange wrote: The Fedora build of libvirt-java is currently broken with a strange error: http://kojipkgs.fedoraproject.org//work/tasks/4719/4994719/build.log

Re: [libvirt] [PATCH 07/14] virsh: Use virDomainGetJobStats in domjobinfo if available

2013-02-22 Thread Jiri Denemark
On Fri, Feb 22, 2013 at 08:18:56 +0100, Peter Krempa wrote: On 02/19/13 13:35, Jiri Denemark wrote: --- tools/virsh-domain.c | 215 --- 1 file changed, 169 insertions(+), 46 deletions(-) diff --git a/tools/virsh-domain.c

Re: [libvirt] Libvirt java build problems

2013-02-22 Thread Claudio Bley
At Fri, 22 Feb 2013 15:43:58 +, Daniel P. Berrange wrote: On Fri, Feb 22, 2013 at 04:34:19PM +0100, Claudio Bley wrote: At Fri, 22 Feb 2013 15:20:03 +, Daniel P. Berrange wrote: You're using JNA = 3.5.0, right? Yep, that's what F19 rawhide has got now. See commit

Re: [libvirt] [PATCH 10/14] Introduce virDomainMigrate*CompressionCache APIs

2013-02-22 Thread Jiri Denemark
On Fri, Feb 22, 2013 at 09:06:42 +0100, Peter Krempa wrote: On 02/19/13 13:35, Jiri Denemark wrote: Introduce virDomainMigrateGetCompressionCache and virDomainMigrateSetCompressionCache APIs. --- +virDomainMigrateGetCompressionCache(virDomainPtr domain, +

Re: [libvirt] [PATCH 11/14] python: Implement virDomainMigrateGetCompressionCache wrapper

2013-02-22 Thread Jiri Denemark
On Fri, Feb 22, 2013 at 09:07:59 +0100, Peter Krempa wrote: On 02/19/13 13:35, Jiri Denemark wrote: --- python/libvirt-override-api.xml | 7 +++ python/libvirt-override.c | 28 2 files changed, 35 insertions(+) diff --git

Re: [libvirt] [PATCH v4 2/9] Introduce NBD migration cookie

2013-02-22 Thread Jiri Denemark
On Thu, Feb 21, 2013 at 14:39:19 +0100, Michal Privoznik wrote: This migration cookie is meant for two purposes. The first is to be sent in begin phase from source to destination to let it know we support new implementation of VIR_MIGRATE_NON_SHARED_{DISK,INC} so destination can start NBD

Re: [libvirt] [PATCH v4 3/9] qemu: Introduce nbd-server-start command

2013-02-22 Thread Jiri Denemark
On Thu, Feb 21, 2013 at 14:39:20 +0100, Michal Privoznik wrote: This will be used with new migration scheme. This patch creates basically just monitor stub functions. Wiring them into something useful is done in later patches. --- src/qemu/qemu_monitor.c | 22 +

Re: [libvirt] [PATCH v4 4/9] qemu: Introduce nbd-server-add command

2013-02-22 Thread Jiri Denemark
On Thu, Feb 21, 2013 at 14:39:21 +0100, Michal Privoznik wrote: This will be used with new migration scheme. This patch creates basically just monitor stub functions. Wiring them into something useful is done in later patches. --- src/qemu/qemu_monitor.c | 22 ++

Re: [libvirt] [PATCH v4 5/9] qemu: Introduce nbd-server-stop command

2013-02-22 Thread Jiri Denemark
On Thu, Feb 21, 2013 at 14:39:22 +0100, Michal Privoznik wrote: This will be used after all migration work is done to stop NBD server running on destination. It doesn't take any arguments, just issues a command. --- src/qemu/qemu_monitor.c | 19 +++

Re: [libvirt] [PATCH] qemu: only release SPICE TLS port if it has been allocated

2013-02-22 Thread Michal Privoznik
On 22.02.2013 16:55, Ján Tomko wrote: Silence the error message that happens during shutdown of a domain with spice graphics, autoport enabled if spice_tls is disabled in qemu.conf: error : virPortAllocatorRelease:174 : port 0 must be in range (5900, 65534) --- src/qemu/qemu_process.c | 6

Re: [libvirt] [PATCH 00/14] Add support for XBZRLE migration compression

2013-02-22 Thread Jiri Denemark
On Tue, Feb 19, 2013 at 13:35:38 +0100, Jiri Denemark wrote: QEMU supports XBZRLE compression of repeatedly transferred pages during live migration and this series makes it usable through libvirt. The first two patches add support for VIR_MIGRATE_COMPRESSED flag that enables XBZRLE

Re: [libvirt] [PATCH] Add support for qxl.revision in domain XML

2013-02-22 Thread Martin Kletzander
On 02/21/2013 04:32 PM, Christophe Fergeau wrote: Hey Martin, Sorry, took me a while to get back to this patch, No problem, I had the same issue :) On Thu, Feb 14, 2013 at 05:54:02PM +0100, Martin Kletzander wrote: On 02/04/2013 04:16 PM, Christophe Fergeau wrote: ---

[libvirt] [RFC PATCH 2/4] qemu: support VIR_DOMAIN_START_PERSISTENT

2013-02-22 Thread Doug Goldstein
Adds support to the qemu driver for the VIR_DOMAIN_START_PERSISTENT flag --- Figured this would be better to define the domain before starting it, rather than starting and then defining but I can change as people prefer. --- src/qemu/qemu_driver.c | 45

[libvirt] [RFC PATCH 1/4] libvirt: add VIR_DOMAIN_START_PERSISTENT flag

2013-02-22 Thread Doug Goldstein
Added a VIR_DOMAIN_START_PERSISTENT flag for virDomainCreateXML() so that the guest remains defined after it is destroyed. The result of using this flag is equivilent to calling virDomainDefineXML() followed by virDomainCreate() or virDomainCreateWithFlags(). --- Not sure if this is the correct

[libvirt] [RFC PATCH 3/4] virsh: add persistent flag for domain create

2013-02-22 Thread Doug Goldstein
Add support for the persistent flag to virsh create to allow creating of guests that remain defined after they are stopped. --- The discussion on https://www.redhat.com/archives/libvir-list/2013-January/msg00490.html was more inclined to have 'virsh create --persistent' so this adds that. ---

Re: [libvirt] [PATCH 4/4] virsh: add support for --start to define cmd

2013-02-22 Thread Doug Goldstein
On Fri, Feb 22, 2013 at 11:40 AM, Doug Goldstein car...@cardoe.com wrote: Added support for a --start flag to the define command --- Implements https://www.redhat.com/archives/libvir-list/2013-January/msg00490.html in a new way using the persistent flag for create. ---

[libvirt] [PATCH 4/4] virsh: add support for --start to define cmd

2013-02-22 Thread Doug Goldstein
Added support for a --start flag to the define command --- Implements https://www.redhat.com/archives/libvir-list/2013-January/msg00490.html in a new way using the persistent flag for create. --- tools/virsh-domain.c | 9 - tools/virsh.pod | 5 +++-- 2 files changed, 11

[libvirt] [PATCH 2/4] storage: Cast uid_t|gid_t to unsigned int

2013-02-22 Thread Philipp Hahn
uid_t and gid_t are opaque types, ranging from s32 to u32 to u64. Explicitly cast them to unsigned int for printing. Signed-off-by: Philipp Hahn h...@univention.de --- src/storage/storage_backend.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 0/4] uid_t|gid_t fixes for 32 bit Linux

2013-02-22 Thread Philipp Hahn
Hello, on 2012-11-23 I already reported a problem with running libvirt on 32 Bit Linuxes (libvirt 0.9.12 on Debian Squeeze in my case) on this ML: [BUG] storage.xml: owner|group=-1 → 2^32-1 on 32 Bit Due to multiple castings the initial -1 gets casted to (unsigned int)4294967295, which

[libvirt] [PATCH 1/4] util: Fix printf format for uid_t|gid_t

2013-02-22 Thread Philipp Hahn
The uid_t|gid_t values are explicitly casted to unsigned long, but the printf() still used %d, which is for signed values. Change the format to %u. Signed-off-by: Philipp Hahn h...@univention.de --- src/util/virutil.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[libvirt] [PATCH 4/4] storage: fix uid_t|gid_t handling on 32 bit Linux

2013-02-22 Thread Philipp Hahn
uid_t and gid_t are opaque types, ranging from s32 to u32 to u64. Unfortunately libvirt uses the value -1 to mean current process, which on Linux32 gets converted to ALLONE := +(2^32-1) = 4294967295. Different libvirt versions used different formatting in the past, which break one or the other

[libvirt] [PATCH 3/4] storage: cast -1 for uid_t|gid_t

2013-02-22 Thread Philipp Hahn
uid_t and gid_t are opaque types, ranging from s32 to u32 to u64. Explicitly cast the magic -1 to the appropriate type. Signed-off-by: Philipp Hahn h...@univention.de --- src/conf/storage_conf.c |8 src/storage/storage_backend.c | 16 src/util/virutil.c

Re: [libvirt] [RFC PATCH 1/4] libvirt: add VIR_DOMAIN_START_PERSISTENT flag

2013-02-22 Thread Daniel P. Berrange
On Fri, Feb 22, 2013 at 11:40:32AM -0600, Doug Goldstein wrote: Added a VIR_DOMAIN_START_PERSISTENT flag for virDomainCreateXML() so that the guest remains defined after it is destroyed. The result of using this flag is equivilent to calling virDomainDefineXML() followed by virDomainCreate()

Re: [libvirt] [RFC PATCH 1/4] libvirt: add VIR_DOMAIN_START_PERSISTENT flag

2013-02-22 Thread Doug Goldstein
On Fri, Feb 22, 2013 at 11:48 AM, Daniel P. Berrange berra...@redhat.com wrote: On Fri, Feb 22, 2013 at 11:40:32AM -0600, Doug Goldstein wrote: Added a VIR_DOMAIN_START_PERSISTENT flag for virDomainCreateXML() so that the guest remains defined after it is destroyed. The result of using this

Re: [libvirt] [PATCHv2 0/8] VirtIO RNG device support

2013-02-22 Thread John Ferlan
On 02/21/2013 09:47 AM, Peter Krempa wrote: Version 2 fixes comments by John and several improvements I noticed. There's 1 new patch in this series. See patch notes for more info. Peter Krempa (8): conf: Add fake switch statement to warn for new device types doc: schema: Add basic

Re: [libvirt] [PATCHv2 1/8] conf: Add fake switch statement to warn for new device types

2013-02-22 Thread Eric Blake
On 02/21/2013 07:47 AM, Peter Krempa wrote: This patch adds a fake switch statement to force the compiler to warn after a new device type was added. This should remind the contributor to add the new device also to this iterator function. --- Notes: Version 2: - NEW in series, kind

Re: [libvirt] [PATCHv2 2/8] doc: schema: Add basic documentation for the virtual RNG device support

2013-02-22 Thread Eric Blake
On 02/21/2013 07:47 AM, Peter Krempa wrote: This patch documents XML elements used for (basic) support of virtual RNG devices. In the devices section in the domain XML users may specify: For the default 'random' backend: devices rng model='virtio' backend

Re: [libvirt] [PATCH v4 6/9] qemu_migration: Introduce qemuMigrationStartNBDServer()

2013-02-22 Thread Jiri Denemark
On Thu, Feb 21, 2013 at 14:39:23 +0100, Michal Privoznik wrote: We need to start NBD server and feed it with all non-shared/, RW and source-full disks. Moreover, with new virPortAllocator we must ensure the borrowed port for NBD server will be returned if either migration completes or qemu

Re: [libvirt] [PATCH v4 8/9] qemu_migration: Stop NBD server at Finish phase

2013-02-22 Thread Jiri Denemark
On Thu, Feb 21, 2013 at 14:39:25 +0100, Michal Privoznik wrote: At the end of migration, it is important to stop NBD server and thus release all allocated resources. --- src/qemu/qemu_migration.c | 26 ++ 1 file changed, 26 insertions(+) ACK Jirka -- libvir-list

Re: [libvirt] [PATCH v4 7/9] qemu_migration: Introduce qemuMigrationDriveMirror

2013-02-22 Thread Jiri Denemark
On Thu, Feb 21, 2013 at 14:39:24 +0100, Michal Privoznik wrote: This function does the source part of NBD magic. It invokes drive-mirror on each non shared and RW disk with a source and wait till the mirroring process completes. When it does we can proceed with migration. Currently, an

Re: [libvirt] [PATCH v4 9/9] qemu_migration: Cancel running jobs on failed migration

2013-02-22 Thread Jiri Denemark
On Thu, Feb 21, 2013 at 14:39:26 +0100, Michal Privoznik wrote: If a migration fails, we need to stop all block jobs running so qemu doesn't try to send data to destination over and over again. --- src/qemu/qemu_migration.c | 46 ++ 1 file changed,

[libvirt] [PATCH 0/5] fix qemumonitorjsontest

2013-02-22 Thread Eric Blake
I hit a segv in qemumonitorjsontest on a new machine, and traced it to through several layers of issues, including not having yajl-devel installed on my end. This series fixes the test failure, and several incidental things that I found along the way. Eric Blake (5): qemu: don't override

[libvirt] [PATCH 2/5] qemu: minor monitor lock cleanups

2013-02-22 Thread Eric Blake
If virCondInit fails (okay, so that's unlikely), then we end up attempting a virObjectUnlock() on the cleanup path, even though we don't hold a lock. This is not guaranteed to be safe. While at it, I noticed a couple places where we were referencing mon-fd outside locks. *

[libvirt] [PATCH 1/5] qemu: don't override earlier json error

2013-02-22 Thread Eric Blake
I built without json support, and noticed a strange failure message in qemumonitorjsontest: 2013-02-22 16:12:37.503+: 19812: error : virJSONValueToString:1119 : internal error No JSON parser implementation is available 2013-02-22 16:12:37.503+: 19812: error :

[libvirt] [PATCH 3/5] tests: avoid segfault if json monitor not present

2013-02-22 Thread Eric Blake
On a machine without json headers, I was seeing random segfaults from qemumonitorjsontest (about 90% of the runs on my particular machine). The segfault was inside virClassIsDerivedFrom, which points to a case of a race leading to unreferencing a stale pointer to an object that had already been

[libvirt] [PATCH 5/5] tests: uniformly report test failures

2013-02-22 Thread Eric Blake
testutils.c likes to print summaries after a test completes, including if it failed. But if the test outright exit()s, this summary is skipped. Enforce that we return instead of exit. * cfg.mk (sc_prohibit_exit_tests): New syntax check. * tests/commandhelper.c (main): Fix offenders. *

[libvirt] [PATCH 4/5] tests: don't test json when not compiled in

2013-02-22 Thread Eric Blake
Now that the segfault is solved, we can skip instead of fail the test when yajl is not present. * tests/qemumonitorjsontest.c (mymain): Skip if no yajl. --- tests/qemumonitorjsontest.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qemumonitorjsontest.c

Re: [libvirt] [PATCH v4 6/9] qemu_migration: Introduce qemuMigrationStartNBDServer()

2013-02-22 Thread Eric Blake
On 02/21/2013 06:39 AM, Michal Privoznik wrote: We need to start NBD server and feed it with all non-shared/, RW and source-full disks. Moreover, with new virPortAllocator we must ensure the borrowed port for NBD server will be returned if either migration completes or qemu process is teared

Re: [libvirt] [PATCHv2 3/8] conf: Add support for RNG device configuration in XML

2013-02-22 Thread Eric Blake
On 02/21/2013 07:47 AM, Peter Krempa wrote: This patch adds basic configuration support for the RNG device suporting s/suporting/supporting/ the virtio model with the random and egd backend types as described in the schema in the previous patch. --- Notes: Version 2: - fix a ton

Re: [libvirt] [PATCHv2 4/8] conf: Add RNG device ABI compatibility check

2013-02-22 Thread Eric Blake
On 02/21/2013 07:47 AM, Peter Krempa wrote: --- Notes: Version 2: - ACKed, no change, doesn't make sense to push alone Still good to go. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP

[libvirt] [PATCH] storage: use f_frsize, not f_bsize, for calculating available space

2013-02-22 Thread Sage Weil
The bfree and blocks fields are supposed to be in units of frsize. We were calculating capacity correctly using those units, but the available calculation was using bsize instead. Most file systems report these as the same value specifically because many programs are buggy, but that is no reason

[libvirt] [PATCH] maint: check all symfiles for sorting

2013-02-22 Thread Eric Blake
On FreeBSD, I got a 'make check' failure: GENcheck-symsorting Symbol block at ./libvirt_atomic.syms:4: viratomic.h not found * src/Makefile.am (SYM_FILES): New define. (check-symsorting): Check on all symfiles, even when not used. * src/libvirt_atomic.syms: Fix offender. --- Pushing under

Re: [libvirt] [PATCHv2 5/8] qemu: Implement support for default 'random' backend for virtio-rng

2013-02-22 Thread Eric Blake
On 02/21/2013 07:47 AM, Peter Krempa wrote: This patch implements support for the virtio-rng-pci device and the rng-random backend in qemu. Two capabilities bits are added to track support for those: QEMU_CAPS_DEVICE_VIRTIO_RNG - for the device support and QEMU_CAPS_OBJECT_RNG_RANDOM -

Re: [libvirt] [PATCH] storage: use f_frsize, not f_bsize, for calculating available space

2013-02-22 Thread Eric Blake
On 02/22/2013 04:43 PM, Sage Weil wrote: The bfree and blocks fields are supposed to be in units of frsize. We were calculating capacity correctly using those units, but the available calculation was using bsize instead. Most file systems report these as the same value specifically because

[libvirt] [PATCH] run: license as LGPL

2013-02-22 Thread Eric Blake
It makes no sense to prohibit reuse of the wrapper in other LGPL projects, since most of libvirt is designed to be LGPL. Of course, when using the wrapper to wrap a GPL program, the combined result is still effectively GPL, but that shouldn't force us to license the wrapper as GPL in isolation.

[libvirt] [PATCH] run: use portable shell

2013-02-22 Thread Eric Blake
Nothing in run required bash, except for the shebang. On systems where /bin/bash doesn't exist (I hit it on FreeBSD), using /bin/sh instead fixes a 'make check' failure: gmake[3]: Entering directory `/usr/home/dummy/libvirt/python' GENcheck-local /usr/local/bin/bash: ../run: /bin/bash: bad

Re: [libvirt] [PATCHv2 6/8] qemu: Implement support for EGD backend for virtio-rng

2013-02-22 Thread Eric Blake
On 02/21/2013 07:47 AM, Peter Krempa wrote: This patch adds a new capability bit QEMU_CAPS_OBJECT_RNG_EGD and code to support the egd backend for the VirtIO RNG device. The device is added by 3 qemu command line options: -chardev socket,id=charrng0,host=1.2.3.4,port=1234 (communication

Re: [libvirt] [PATCHv2 7/8] tests: Add tests for virtio-rng device handling

2013-02-22 Thread Eric Blake
On 02/21/2013 07:47 AM, Peter Krempa wrote: Adds XML parsing and qemu commandline tests for the VirtIO RNG device support. --- Notes: Version 2: - ACKed .../qemuxml2argv-virtio-rng-egd.args | 1 + .../qemuxml2argv-virtio-rng-egd.xml| 26

Re: [libvirt] [PATCHv2 8/8] virtio-rng: Add rate limiting options for virtio-RNG

2013-02-22 Thread Eric Blake
On 02/21/2013 07:47 AM, Peter Krempa wrote: Qemu's implementation of virtio RNG supports rate limiting of the entropy used. This patch exposes the option to tune this fucntionality. s/fucntionality/functionality/ This patch is based on qemu commit 904d6f588063fb5ad2b61998acdf1e73fb4 The

Re: [libvirt] [PATCH] run: license as LGPL

2013-02-22 Thread Richard W.M. Jones
On Fri, Feb 22, 2013 at 05:19:15PM -0700, Eric Blake wrote: It makes no sense to prohibit reuse of the wrapper in other LGPL projects, since most of libvirt is designed to be LGPL. Of course, when using the wrapper to wrap a GPL program, the combined result is still effectively GPL, but that