Re: [libvirt] [PATCH] virfile: safezero: fall back to writing block by block if mmap fails

2013-10-03 Thread Michal Privoznik
On 02.10.2013 09:31, Oskari Saarenmaa wrote: > mmap can fail on 32-bit systems if we're trying to zero out a lot of data. > Fall back to using block-by-block writing in that case. While we could map > smaller blocks it's unlikely that this code is used a lot and its easier to > just fall back to o

Re: [libvirt] [PATCH] build: fix build --without-remote

2013-10-03 Thread Michal Privoznik
On 28.09.2013 04:55, Eric Blake wrote: > I tried to test ./configure --without-lxc --without-remote. > First, the build failed with some odd errors, such as an > inability to build xen, or link failures for virNetTLSInit. > But when you think about it, once there is no remote code, > all of libvirt

Re: [libvirt] [PATCH] test: snapshots: Fix some unused variables

2013-10-03 Thread Eric Blake
On 10/03/2013 03:38 PM, Cole Robinson wrote: > Spotted by coverity as John mentioned here: > http://www.redhat.com/archives/libvir-list/2013-October/msg00078.html > --- > src/test/test_driver.c | 24 ++-- > 1 file changed, 2 insertions(+), 22 deletions(-) > > diff --git a/src/

Re: [libvirt] [PATCH] nodedev: Resolve Relax-NG validity error

2013-10-03 Thread Eric Blake
On 10/03/2013 03:16 PM, John Ferlan wrote: > Commit id 'c4a4603de' added an output to the nodedev xml, but > did not update the schema. > > This resulted in the failure of the 'virt-xml-validate' on a file > generated by 'virsh nodedev-dumpxml pci__00_00_0' (for example). > > This was found/

[libvirt] [PATCH] test: snapshots: Fix some unused variables

2013-10-03 Thread Cole Robinson
Spotted by coverity as John mentioned here: http://www.redhat.com/archives/libvir-list/2013-October/msg00078.html --- src/test/test_driver.c | 24 ++-- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 255cc2b..

Re: [libvirt] [PATCH v3 3/8] test: Implement readonly snapshot APIs

2013-10-03 Thread Cole Robinson
On 10/02/2013 06:40 AM, John Ferlan wrote: > On 09/25/2013 03:15 PM, Cole Robinson wrote: >> This is just stolen from qemu_driver.c with tweaks to fit the >> test driver. >> --- >> src/test/test_driver.c | 392 >> + >> 1 file changed, 392 insertions

Re: [libvirt] [PATCH v3 4/8] test: Implement snapshot create/delete/revert APIs

2013-10-03 Thread Cole Robinson
On 09/26/2013 10:44 AM, Michal Privoznik wrote: > On 25.09.2013 21:15, Cole Robinson wrote: >> Again stolen from qemu_driver.c, but dropping all the unneeded bits. >> This aims to copy all the current qemu validation checks since that's >> the most commonly used real driver, but some of the checks

Re: [libvirt] [PATCH v3 7/8] test: snapshot: Add REDEFINE support

2013-10-03 Thread Cole Robinson
On 09/27/2013 02:13 AM, Michal Privoznik wrote: > On 25.09.2013 21:15, Cole Robinson wrote: >> --- >> src/test/test_driver.c | 67 >> -- >> 1 file changed, 43 insertions(+), 24 deletions(-) >> >> diff --git a/src/test/test_driver.c b/src/test/test_d

Re: [libvirt] [PATCH v3 6/8] qemu: snapshot: Break out redefine preparation to shared function

2013-10-03 Thread Cole Robinson
On 09/27/2013 02:13 AM, Michal Privoznik wrote: > On 25.09.2013 21:15, Cole Robinson wrote: >> --- >> src/conf/snapshot_conf.c | 150 >> +++ >> src/conf/snapshot_conf.h | 7 +++ >> src/libvirt_private.syms | 1 + >> src/qemu/qemu_driver.c | 131 +-

[libvirt] [PATCH] nodedev: Resolve Relax-NG validity error

2013-10-03 Thread John Ferlan
Commit id 'c4a4603de' added an output to the nodedev xml, but did not update the schema. This resulted in the failure of the 'virt-xml-validate' on a file generated by 'virsh nodedev-dumpxml pci__00_00_0' (for example). This was found/seen by running autotest on my host. --- I'm not sure if

Re: [libvirt] [PATCH] build: fix 'make -C src check' under subset builds

2013-10-03 Thread Eric Blake
On 09/27/2013 07:32 AM, Eric Blake wrote: > Another build failure detected on cygwin, where lxc is not built. > The lxc_monitor_protocol.c file requires the use of $(XDR_CFLAGS), > but should only be built on platforms where WITH_LXC is true; > however, 'make -C src check' was unconditionally tryin

Re: [libvirt] [PATCH] build: fix build --without-remote

2013-10-03 Thread Eric Blake
On 09/27/2013 08:55 PM, Eric Blake wrote: > I tried to test ./configure --without-lxc --without-remote. > First, the build failed with some odd errors, such as an > inability to build xen, or link failures for virNetTLSInit. > But when you think about it, once there is no remote code, > all of libv

Re: [libvirt] [PATCH] Fix crash in libvirtd when events are registered & ACLs active

2013-10-03 Thread Eric Blake
On 09/27/2013 09:26 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > When a client disconnects from libvirtd, all event callbacks > must be removed. This involves running the public API > > virConnectDomainEventDeregisterAny > > This code does not run in normal API dispatch cont

Re: [libvirt] [PATCH] qemu: check actual netdev type rather than config netdev type during init

2013-10-03 Thread Eric Blake
On 10/03/2013 05:24 AM, Laine Stump wrote: > This resolves: > >https://bugzilla.redhat.com/show_bug.cgi?id=1012834 > > Note that a similar problem was reported in: > >https://bugzilla.redhat.com/show_bug.cgi?id=827519 > > but the fix only worked for , *not* for > where the network itse

Re: [libvirt] [PATCH 2/3] Don't pass virConnectPtr in nwfilter 'struct domUpdateCBStruct'

2013-10-03 Thread Laine Stump
On 10/03/2013 09:06 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > The nwfilter driver only needs a reference to its private > state object, not a full virConnectPtr. Update the domUpdateCBStruct > struct to have a 'void *opaque' field instead of a virConnectPtr. > > Signed-off-by:

Re: [libvirt] [PATCH 0/5] Fill qemucapabilitiesdata with some data

2013-10-03 Thread Eric Blake
On 10/03/2013 07:25 AM, Michal Privoznik wrote: > The actual patches are accessible at: > > git://gitorious.org/libvirt/michal-staging.git > > branch test_qemu_capabilities_data > > I'm not sending the actual patches as it's big junk of JSON qemu replies. The > patches has from 35KiB to 59KiB. I

Re: [libvirt] [PATCH 2/3] Don't pass virConnectPtr in nwfilter 'struct domUpdateCBStruct'

2013-10-03 Thread Eric Blake
On 10/03/2013 07:06 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > The nwfilter driver only needs a reference to its private > state object, not a full virConnectPtr. Update the domUpdateCBStruct > struct to have a 'void *opaque' field instead of a virConnectPtr. > > Signed-off-b

Re: [libvirt] [PATCH 1/3] Remove virConnectPtr arg from virNWFilterDefParse*

2013-10-03 Thread Daniel P. Berrange
On Thu, Oct 03, 2013 at 09:41:07AM -0400, Laine Stump wrote: > On 10/03/2013 09:06 AM, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > None of the virNWFilterDefParse* methods require a virConnectPtr > > arg, so just drop it > > > > Signed-off-by: Daniel P. Berrange > > --- > >

Re: [libvirt] [PATCH 3/3] Remove use of virConnectPtr from all remaining nwfilter code

2013-10-03 Thread Laine Stump
On 10/03/2013 09:07 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > The virConnectPtr is passed around loads of nwfilter code in > order to provide it as a parameter to the callback registered > by the virt drivers. None of the virt drivers use this param > though, so it serves no p

Re: [libvirt] [PATCH 1/3] Remove virConnectPtr arg from virNWFilterDefParse*

2013-10-03 Thread Laine Stump
On 10/03/2013 09:06 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > None of the virNWFilterDefParse* methods require a virConnectPtr > arg, so just drop it > > Signed-off-by: Daniel P. Berrange > --- > src/conf/nwfilter_conf.c | 15 ++- > src/conf/nwfilter_conf.h

[libvirt] [PATCH 3/5] qemucapabilitiesdata: Add qemu-1.4.2 data

2013-10-03 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/qemucapabilitiesdata/caps_1.4.2-1.caps| 129 ++ tests/qemucapabilitiesdata/caps_1.4.2-1.replies | 1765 +++ tests/qemucapabilitiestest.c|1 + 3 files changed, 1895 insertions(+) create mode 100644 tests/qe

[libvirt] [PATCH 2/5] qemucapabilitiesdata: Add qemu-1.3.1 data

2013-10-03 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/qemucapabilitiesdata/caps_1.3.1-1.caps| 128 ++ tests/qemucapabilitiesdata/caps_1.3.1-1.replies | 1715 +++ tests/qemucapabilitiestest.c|1 + 3 files changed, 1844 insertions(+) create mode 100644 tests/qe

[libvirt] [PATCH 4/5] qemucapabilitiesdata: Add qemu-1.6.0 data

2013-10-03 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/qemucapabilitiesdata/caps_1.6.0-1.caps| 137 ++ tests/qemucapabilitiesdata/caps_1.6.0-1.replies | 2499 +++ tests/qemucapabilitiestest.c|1 + 3 files changed, 2637 insertions(+) create mode 100644 tests/qe

[libvirt] [PATCH 1/5] qemucapabilitiesdata: Add qemu-1.2.2 data

2013-10-03 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/qemucapabilitiesdata/caps_1.2.2-1.caps| 114 ++ tests/qemucapabilitiesdata/caps_1.2.2-1.replies | 1543 +++ tests/qemucapabilitiestest.c|1 + 3 files changed, 1658 insertions(+) create mode 100644 tests/qe

[libvirt] [PATCH 0/5] Fill qemucapabilitiesdata with some data

2013-10-03 Thread Michal Privoznik
The actual patches are accessible at: git://gitorious.org/libvirt/michal-staging.git branch test_qemu_capabilities_data I'm not sending the actual patches as it's big junk of JSON qemu replies. The patches has from 35KiB to 59KiB. I don't want to overload the list. Michal Privoznik (5): qemuc

[libvirt] [PATCH 5/5] qemucapabilitiesdata: Add qemu-1.6.50 data

2013-10-03 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/qemucapabilitiesdata/caps_1.6.50-1.caps| 136 ++ tests/qemucapabilitiesdata/caps_1.6.50-1.replies | 2476 ++ tests/qemucapabilitiestest.c |1 + 3 files changed, 2613 insertions(+) create mode 100644 tests/

[libvirt] [PATCH 2/3] Don't pass virConnectPtr in nwfilter 'struct domUpdateCBStruct'

2013-10-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The nwfilter driver only needs a reference to its private state object, not a full virConnectPtr. Update the domUpdateCBStruct struct to have a 'void *opaque' field instead of a virConnectPtr. Signed-off-by: Daniel P. Berrange --- src/conf/nwfilter_conf.c

[libvirt] [PATCH 1/3] Remove virConnectPtr arg from virNWFilterDefParse*

2013-10-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" None of the virNWFilterDefParse* methods require a virConnectPtr arg, so just drop it Signed-off-by: Daniel P. Berrange --- src/conf/nwfilter_conf.c | 15 ++- src/conf/nwfilter_conf.h | 6 ++ src/nwfilter/nwfilter_driver.c | 2 +- src/qe

[libvirt] [PATCH 0/3] Avoid crash due to race in nwfilter reload/libvirtd startup

2013-10-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The past 24 hours have seen a flurry of libvirtd crash reports from Fedora users. https://bugzilla.redhat.com/show_bug.cgi?id=1014933 In one thread we have the libvirtd daemon startup code running, and it is in the middle of QEMU state initialization. #9 0xb00882e

[libvirt] [PATCH 3/3] Remove use of virConnectPtr from all remaining nwfilter code

2013-10-03 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The virConnectPtr is passed around loads of nwfilter code in order to provide it as a parameter to the callback registered by the virt drivers. None of the virt drivers use this param though, so it serves no purpose. Avoiding the need to pass a virConnectPtr means that

Re: [libvirt] [PATCH v3 0/2] expose baselabel for each sec model/virt type

2013-10-03 Thread Giuseppe Scrivano
Giuseppe Scrivano writes: >> *v3 major changes >> - support LXC >> - merge virSecurityDACSetUser and virSecurityDACSetGroup in >> virSecurityDACSetUserAndGroup >> - DAC sets the baselabel in virSecurityDACSetUserAndGroup >> - Use virDomainVirtTypeToString instead of hardcoding the name >> >> Gi

[libvirt] [PATCH] qemu: check actual netdev type rather than config netdev type during init

2013-10-03 Thread Laine Stump
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1012834 Note that a similar problem was reported in: https://bugzilla.redhat.com/show_bug.cgi?id=827519 but the fix only worked for , *not* for where the network itself was a pool of hostdevs. The symptom in both cases was this

[libvirt] ANNOUNCE: Perl binding Sys-Virt releases 1.1.2 & 1.1.3

2013-10-03 Thread Daniel P. Berrange
I am pleased to announce that releases 1.1.2 & 1.1.3 of Sys-Virt, the libvirt Perl API binding are now available for download: http://search.cpan.org/CPAN/authors/id/D/DA/DANBERR/Sys-Virt-1.1.2.tar.gz http://search.cpan.org/CPAN/authors/id/D/DA/DANBERR/Sys-Virt-1.1.3.tar.gz Changed in the 1.1

Re: [libvirt] [PATCH v2 1/5] qemuMonitorTestFree: Join worker thread

2013-10-03 Thread Daniel P. Berrange
On Thu, Oct 03, 2013 at 12:49:33PM +0200, Michal Privoznik wrote: > Join the worker thread no matter if it is running or zombie already. > With current implementation the thread is joined iff @running is true. > However, when worker executes the last line, @running is set to false. > Hence qemuMoni

[libvirt] [PATCH v2 4/5] qemumonitorjsontest: Test qemuMonitorJSONGetVirtType

2013-10-03 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/qemumonitorjsontest.c | 53 + 1 file changed, 53 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 15541dd..67a58f5 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests

[libvirt] [PATCH v2 5/5] qemumonitorjsontest: Test qemuMonitorJSONSendKey

2013-10-03 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/qemumonitorjsontest.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 67a58f5..0b6807d 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontes

[libvirt] [PATCH v2 3/5] qemumonitorjsontest: Test qemuMonitorJSONGetCPUInfo

2013-10-03 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- tests/qemumonitorjsontest.c | 77 + 1 file changed, 77 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 52b1a5b..15541dd 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests

[libvirt] [PATCH v2 2/5] qemumonitorjsontest: Extend the test for yet another monitor commands

2013-10-03 Thread Michal Privoznik
So far, we're unit testing some basic functions and some (so called) simple functions (e.g. "qmp_capabilities", "system_powerdown"). However, there are more functions which expect simple "{'return': {}}" reply, but takes more args to construct the command (for instance "set_link"). This patch aims

[libvirt] [PATCH v2 0/5] qemumonitorjsontest: Introduce some tests

2013-10-03 Thread Michal Privoznik
v2 to some patches that weren't ACKed yet. Michal Privoznik (5): qemuMonitorTestFree: Join worker thread qemumonitorjsontest: Extend the test for yet another monitor commands qemumonitorjsontest: Test qemuMonitorJSONGetCPUInfo qemumonitorjsontest: Test qemuMonitorJSONGetVirtType qemumoni

[libvirt] [PATCH v2 1/5] qemuMonitorTestFree: Join worker thread

2013-10-03 Thread Michal Privoznik
Join the worker thread no matter if it is running or zombie already. With current implementation the thread is joined iff @running is true. However, when worker executes the last line, @running is set to false. Hence qemuMonitorTestFree() won't join it (and free resources) even though we can clearl

Re: [libvirt] [PATCH 02/18] qemumonitorjsontest: Test qemuMonitorJSONSystemPowerdown

2013-10-03 Thread Daniel P. Berrange
On Thu, Oct 03, 2013 at 12:44:20PM +0200, Michal Privoznik wrote: > On 02.10.2013 20:08, Daniel P. Berrange wrote: > > On Wed, Oct 02, 2013 at 11:42:13AM -0600, Eric Blake wrote: > >> On 10/02/2013 11:09 AM, Michal Privoznik wrote: > >>> Right now, we are testing qemuMonitorSystemPowerdown instead

Re: [libvirt] [PATCH 02/18] qemumonitorjsontest: Test qemuMonitorJSONSystemPowerdown

2013-10-03 Thread Michal Privoznik
On 02.10.2013 20:08, Daniel P. Berrange wrote: > On Wed, Oct 02, 2013 at 11:42:13AM -0600, Eric Blake wrote: >> On 10/02/2013 11:09 AM, Michal Privoznik wrote: >>> Right now, we are testing qemuMonitorSystemPowerdown instead of >>> qemuMonitorJSONSystemPowerdown. It makes no harm, as both functions

Re: [libvirt] [PATCH 06/18] qemumonitorjsontest: Test qemuMonitorJSONGetCPUInfo

2013-10-03 Thread Michal Privoznik
On 02.10.2013 20:31, Eric Blake wrote: > On 10/02/2013 11:09 AM, Michal Privoznik wrote: >> >> Signed-off-by: Michal Privoznik >> --- >> tests/qemumonitorjsontest.c | 77 >> + >> 1 file changed, 77 insertions(+) >> >> + "

Re: [libvirt] ANNOUNCE: libvirt 1.0.5.6 maintenance release

2013-10-03 Thread Christophe Fergeau
Hey, On Wed, Oct 02, 2013 at 08:12:24PM +0200, Guido Günther wrote: > > It would be very nice if the announce mail included either a sha256 > > checksum for the tarball (thanks Guido for doing that in your recent > > release!), or a GPG key used to sign the release, see > > http://lwn.net/Articles